Skip to content

Commit

Permalink
Merge pull request #310 from InvalidCode/master
Browse files Browse the repository at this point in the history
增加gitment评论
  • Loading branch information
tufu9441 authored Aug 6, 2017
2 parents bb356ee + 5412143 commit 3a4d6e8
Show file tree
Hide file tree
Showing 6 changed files with 4,930 additions and 0 deletions.
7 changes: 7 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
fancybox: true ## If you want to use fancybox please set the value to true.
duoshuo: ## Your duoshuo_shortname, e.g. username
disqus: ## Your disqus_shortname, e.g. username
gitment:
enable: ##如果你想开启true
owner: '用户名'
repo: '博客地址'
client_id: 'id'
client_secret: 'secret'
uyan: ## Your uyan_id. e.g. 1234567
gentie: ## Your gentie_productKey, e.g. fc799538c7ad4cf5a5a0c2877a90cbd7
livere: ## Your livere data-uid, e.g. MTAyMC8yOTgxxxxxxxxx
Expand All @@ -18,6 +24,7 @@ toc_number: true ## If you want to add list number to toc please set the value t
shareto: true ## If you want to use the share button please set the value to true.
busuanzi: true ## If you want to use Busuanzi page views please set the value to true.
widgets_on_small_screens: false ## Set to true to enable widgets on small screens.
canvas_nest: ##动态背景 开启true

menu:
- page: home
Expand Down
15 changes: 15 additions & 0 deletions layout/_partial/comments.jade
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
if theme.gitment.enable
#container
link(rel='stylesheet', href='/css/default.css')
script(src='/js/gitment.browser.js')
script.
var gitment = new Gitment({
owner: '#{theme.gitment.owner}',
repo: '#{theme.gitment.repo}',
oauth: {
client_id: '#{theme.gitment.client_id}',
client_secret: '#{theme.gitment.client_secret}',
},
})
gitment.render('container')

if theme.duoshuo
.ds-thread(data-thread-key=page.path, data-title=page.title, data-url=page.permalink, data-author-key='1')

Expand Down
4 changes: 4 additions & 0 deletions layout/_partial/footer.jade
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
a(rel='nofollow', target='_blank', href='https://github.com/tufu9441/maupassant-hexo') Theme
| by
a(rel='nofollow', target='_blank', href='https://github.com/pagecho') Cho.

//动态背景
if theme.canvas_nest
script(type="text/javascript",color="7,196,239",opacity='0.5',zIndex="-2",count="50",src="/js/canvas-nest.min.js")
Loading

0 comments on commit 3a4d6e8

Please sign in to comment.