Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ hexo-theme-yilia

Yilia 是为 [hexo](https://github.com/tommy351/hexo) 2.4+制作的主题。
崇尚简约优雅,以及极致的性能。 你可以点击 [我的博客](http://litten.me/) 查看效果。

如果想体验手机浏览效果,可以扫一下二维码:

![litten-qrcode](https://cloud.githubusercontent.com/assets/2024949/6349328/51a067fe-bc64-11e4-881c-f68050c50c28.png)
Expand Down Expand Up @@ -34,7 +34,7 @@ Yilia 是为 [hexo](https://github.com/tommy351/hexo) 2.4+制作的主题。
**计划中:**

1. 移动端优化

## 一、外观

####**常规**
Expand Down Expand Up @@ -110,7 +110,7 @@ rss: /atom.xml
# 是否需要修改 root 路径
# 如果您的网站存放在子目录中,例如 http://yoursite.com/blog,
# 请将您的 url 设为 http://yoursite.com/blog 并把 root 设为 /blog/。
root:
root:

# Content

Expand All @@ -129,9 +129,9 @@ reward_type: 2
# 打赏wording
reward_wording: '谢谢你请我吃糖果'
# 支付宝二维码图片地址,跟你设置头像的方式一样。比如:/assets/img/alipay.jpg
alipay:
alipay:
# 微信二维码图片地址
weixin:
weixin:

# 目录
# 目录设定:0-不显示目录; 1-文章对应的md文件里有toc:true属性,才有目录; 2-所有文章均显示目录
Expand All @@ -155,7 +155,7 @@ avatar:
#是否开启分享
share_jia: true

#评论:1、多说;2、网易云跟帖;3、畅言;4、Disqus;5、Gitment
#评论:1、多说;2、网易云跟帖;3、畅言;4、Disqus;5、Gitment; 6、Gitalk
#不需要使用某项,直接设置值为false,或注释掉
#具体请参考wiki:https://github.com/litten/hexo-theme-yilia/wiki/

Expand All @@ -179,6 +179,16 @@ gitment_oauth:
client_id: '' #client ID
client_secret: '' #client secret

#6、Gitalk
gitalk:
enable: true #用来做启用判断可以不用
owner: '' #Github 用户名
repo: '' #储存评论issue的github仓库名
admin: '' #Github 用户名
clientID: '' #Github Application clientID
clientSecret: '' #Github Application clientSecret
distractionFreeMode: '' #Facebook-like distraction free mode

# 样式定制 - 一般不需要修改,除非有很强的定制欲望…
style:
# 头像上面的背景颜色
Expand Down Expand Up @@ -211,5 +221,3 @@ friends:

aboutme: 很惭愧<br><br>只做了一点微小的工作<br>谢谢大家
```


18 changes: 14 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ reward_type: 2
# 打赏wording
reward_wording: '谢谢你请我吃糖果'
# 支付宝二维码图片地址,跟你设置头像的方式一样。比如:/assets/img/alipay.jpg
alipay:
alipay:
# 微信二维码图片地址
weixin:
weixin:

# 目录
# 目录设定:0-不显示目录; 1-文章对应的md文件里有toc:true属性,才有目录; 2-所有文章均显示目录
Expand All @@ -73,7 +73,7 @@ avatar:
#是否开启分享
share_jia: true

#评论:1、多说;2、网易云跟帖;3、畅言;4、Disqus;5、Gitment
#评论:1、多说;2、网易云跟帖;3、畅言;4、Disqus;5、Gitment; 6、Gitalk
#不需要使用某项,直接设置值为false,或注释掉
#具体请参考wiki:https://github.com/litten/hexo-theme-yilia/wiki/

Expand All @@ -97,6 +97,16 @@ gitment_oauth:
client_id: '' #client ID
client_secret: '' #client secret

#6、Gitalk
gitalk:
enable: true #用来做启用判断可以不用
owner: '' #Github 用户名
repo: '' #储存评论issue的github仓库名
admin: '' #Github 用户名
clientID: '' #Github Application clientID
clientSecret: '' #Github Application clientSecret
distractionFreeMode: false #Facebook-like distraction free mode

# 样式定制 - 一般不需要修改,除非有很强的定制欲望…
style:
# 头像上面的背景颜色
Expand Down Expand Up @@ -127,4 +137,4 @@ friends:
友情链接5: http://localhost:4000/
友情链接6: http://localhost:4000/

aboutme: 很惭愧<br><br>只做了一点微小的工作<br>谢谢大家
aboutme: 很惭愧<br><br>只做了一点微小的工作<br>谢谢大家
11 changes: 10 additions & 1 deletion layout/_partial/article.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
url: config.url+url_for(post.path)
}) %>
<% } %>

<% if (theme.wangyiyun){ %>
<%- partial('post/wangyiyun', {
key: post.slug,
Expand Down Expand Up @@ -129,4 +129,13 @@
url: config.url+url_for(post.path)
}) %>
<% } %>

<% if (theme.gitalk.owner && theme.gitalk.repo && theme.gitalk.enable && theme.gitalk.clientID && theme.gitalk.clientSecret){ %>
<%- partial('post/gitalk', {
key: post.slug,
title: post.title,
url: config.url+url_for(post.path)
}) %>
<% } %>

<% } %>
16 changes: 14 additions & 2 deletions layout/_partial/footer.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,20 @@
&copy; <%= date(new Date(), 'YYYY') %> <%= config.author || config.title %>
</div>
<div class="footer-right">
<a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://github.com/litten/hexo-theme-yilia" target="_blank">Yilia</a> by Litten
<a href="https://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://github.com/litten/hexo-theme-yilia" target="_blank">Yilia</a> by Litten
</div>
</div>
</div>
</footer>
<!-- 不蒜子内容 Start-->
<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<span id="busuanzi_container_site_pv" style="display: inline;">
本站总访问量<span id="busuanzi_value_site_pv"></span>次
</span>
<span id="busuanzi_container_site_uv" style="display: inline;">
总访客数<span id="busuanzi_value_site_uv"></span>人次
</span>
<span id="busuanzi_container_page_pv">
本文总阅读量<span id="busuanzi_value_page_pv"></span>次
</span>
<!-- 不蒜子内容 End -->
</footer>
15 changes: 15 additions & 0 deletions layout/_partial/post/gitalk.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css">
<div id="gitalk-container"></div>
<script src="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js"></script>
<script type="text/javascript">
var gitalk = new Gitalk({
clientID: '<%= theme.gitalk.clientID %>',
clientSecret: '<%= theme.gitalk.clientSecret %>',
id: window.location.pathname,
repo: '<%= theme.gitalk.repo %>',
owner: '<%= theme.gitalk.owner %>',
admin: '<%= theme.gitalk.admin %>',
distractionFreeMode: '<%= theme.gitalk.distractionFreeMode %>'
})
gitalk.render('gitalk-container')
</script>
4 changes: 2 additions & 2 deletions layout/_partial/post/share.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
<a class="close js-modal-close" href="javascript:;"><i class="icon icon-close"></i></a>
<p>扫一扫,分享到微信</p>
<div class="wx-qrcode">
<img src="<%- 'qrcode' in locals ? qrcode(sUrl) : '//pan.baidu.com/share/qrcode?url=' + sUrl %>" alt="微信分享二维码">
<img src="<%- 'qrcode' in locals ? qrcode(sUrl) : 'https://bshare.optimix.asia/barCode?site=weixin&url=' + sUrl %>" alt="微信分享二维码">
</div>
</div>

<div class="mask js-mask"></div>
<div class="mask js-mask"></div>
2 changes: 1 addition & 1 deletion source-src/css/comment.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#disqus_thread, .duoshuo, .cloud-tie-wrapper, #SOHUCS, #gitment-ctn {
#disqus_thread, .duoshuo, .cloud-tie-wrapper, #SOHUCS, #gitment-ctn, #gitalk-container {
padding: 0 30px !important;
min-height: 20px;
}
Expand Down
Loading