gitalk评论
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script>
|
||||
var yiliaConfig = {
|
||||
window.yiliaConfig = {
|
||||
isHome: <%=is_home()%>,
|
||||
isPost: <%=is_post()%>,
|
||||
isArchive: <%=is_archive()%>,
|
||||
@@ -11,4 +11,21 @@ var yiliaConfig = {
|
||||
showTags: <%=(theme.slider && theme.slider.showTags) ? true : false%>
|
||||
}
|
||||
</script>
|
||||
<%- partial('script') %>
|
||||
<%- partial('script') %>
|
||||
<% if(theme.gitalk.enable && is_post()) { %>
|
||||
<link rel="stylesheet" type="text/css" href="https://unpkg.com/gitalk/dist/gitalk.css">
|
||||
<script src="https://unpkg.com/gitalk/dist/gitalk.min.js"></script>
|
||||
<script>
|
||||
(function(Gitalk){
|
||||
new Gitalk({
|
||||
clientID: '<%=theme.gitalk.ClientID%>',
|
||||
clientSecret: '<%=theme.gitalk.ClientSecret%>',
|
||||
repo: '<%=theme.gitalk.repo%>',
|
||||
owner: '<%=theme.gitalk.githubID%>',
|
||||
admin: ['<%=theme.gitalk.adminUser%>'],
|
||||
id: decodeURI(location.pathname),
|
||||
distractionFreeMode: <%=theme.gitalk.distractionFreeMode%>
|
||||
}).render('gittalk-container')
|
||||
})(Gitalk)
|
||||
</script>
|
||||
<% } %>
|
||||
@@ -122,11 +122,7 @@
|
||||
</section>
|
||||
<% } %>
|
||||
|
||||
<% if (theme.gitment_owner && theme.gitment_repo &&theme.gitment_oauth && theme.gitment_oauth.client_id && theme.gitment_oauth.client_secret){ %>
|
||||
<%- partial('post/gitment', {
|
||||
key: post.slug,
|
||||
title: post.title,
|
||||
url: config.url+url_for(post.path)
|
||||
}) %>
|
||||
<% if(theme.gitalk.enable){ %>
|
||||
<div id="gittalk-container" style="margin:0 30px"></div>
|
||||
<% } %>
|
||||
<% } %>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
© <%= 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
|
||||
Power By <a href="http://hexo.io/" target="_blank">Hexo</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
<div id="gitment-ctn"></div>
|
||||
<link rel="stylesheet" href="//imsun.github.io/gitment/style/default.css">
|
||||
<script src="//imsun.github.io/gitment/dist/gitment.browser.js"></script>
|
||||
<script>
|
||||
(function(){
|
||||
new Gitment({
|
||||
id: "<%=url%>",
|
||||
owner: '<%=theme.gitment_owner%>',
|
||||
repo: '<%=theme.gitment_repo%>',
|
||||
oauth: {
|
||||
client_id: '<%=theme.gitment_oauth.client_id%>',
|
||||
client_secret: '<%=theme.gitment_oauth.client_secret%>'
|
||||
}
|
||||
}).render('gitment-ctn')
|
||||
})()
|
||||
</script>
|
||||
@@ -1 +1 @@
|
||||
<%- js('js/mobile.bc3ac97a4b2208729e1e.js') %> <%- js('js/slider.aa150152ad0b4e146925.js') %> <%- js('js/main.f26f0d0b8a2e2ae348ae.js') %>
|
||||
<%- js('js/mobile.04379a910e1ff32f2a41.js') %> <%- js('js/slider.a725c75e59c2eeae98e0.js') %> <%- js('js/main.254cebd259c4777bdd2e.js') %>
|
||||
Reference in New Issue
Block a user