Skip to content
Permalink
Browse files

采用DisqusJS为暂无能力突破网络封锁的用户提供便利

更改service worker的实现方式

Signed-off-by: zscself <zscself@gmail.com>
  • Loading branch information...
firedent committed Sep 30, 2019
1 parent fc7333a commit d1d7cfae77bcdb227500ac5e558534e12831db9e
@@ -2,9 +2,9 @@

menu:
主页: /
2018年计划: /posts/13f2871/
2018年计划: /posts/13f2871/
BiLiBiLi弹幕解密器: https://bilibili.zscself.com/
公钥(90E2C209): /download/90E2C209–Public.asc
公钥(4492E554): /download/4492E554–Public.asc
网站地图: /sitemap.xml

# SubNav
@@ -75,6 +75,7 @@ top: true
# Miscellaneous
baidu_analytics: '10d5995ba60a44948e3bf579c6065e10'
google_analytics: 'UA-92400662-1'
google_adsense: 'ca-pub-5449073639010251'
favicon: /images/frog.png

#你的头像url
@@ -99,6 +100,12 @@ changyan_conf: false

#4、Disqus 在hexo根目录的config里也有disqus_shortname字段,优先使用yilia的
disqus: 'firet'
disqusjs:
siteName: 'F!redent'
api: ''
apikey: 'wsQ74y9hNqCCErZJ0l6P9pMnAhjylWkkjcoQqL0NRscjXWchIxdUBTFQxzVhcKyS'
admin: 'Fir3d3nt'
adminLabel: '站长大人'

#5、Gitment
gitment_owner: false #你的 GitHub ID
@@ -138,7 +145,7 @@ archives:
2014年 ヾ(=・ω・=)o: /archives/2014
friends:
谁佛: http://sheifo.com/
aboutme: 这里是F!redent的个人网站<br>创建于2014-09-12<br>湿货多和啰哩啰嗦是本站的两大特点。<br><br><br>很惭愧<br><br>只做了一点微小的工作<br>谢谢大家
aboutme: 这里是F!redent的个人网站<br>始于2014-09-12<br>湿货多和啰哩啰嗦是本站的两大特点。<br><br>很惭愧<br>只做了一点微小的工作<br><br>谢谢大家

# 版权声明
# 请在需要进行版权声明的文章的md文件头部,设置属性declare: true
@@ -105,22 +105,11 @@
<% } %>

<% if (theme.disqus || config.disqus_shortname){ %>
<section id="comments">
<div class="disqus_notice">如果评论框加载不出来,说明您当前无法正常访问国际互联网(Disqus被墙)。<br>你看着办吧 ┑( ̄Д  ̄)┍</div>
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = '<%= theme.disqus || config.disqus_shortname %>'; // required: replace example with your forum shortname

/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</section>
<%- partial('post/DisqusJS', {
key: post.slug,
title: post.title,
url: config.url+url_for(post.path)
}) %>
<% } %>

<% if (theme.gitment_owner && theme.gitment_repo &&theme.gitment_oauth && theme.gitment_oauth.client_id && theme.gitment_oauth.client_secret){ %>
@@ -1 +1 @@
<link rel="stylesheet" type="text/css" href="<%=config.root%>./main.4f01d9.css">
<link rel="stylesheet" type="text/css" href="<%=config.root%>./main.8b101d.css">
@@ -0,0 +1,11 @@
<% if (theme.google_adsense){ %>
<!-- Google AdSense -->
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "<%= theme.google_adsense %>",
enable_page_level_ads: true
});
</script>
<!-- End Google AdSense -->
<% } %>
@@ -40,4 +40,5 @@
</style>
<%- partial('google-analytics') %>
<%- partial('baidu-analytics') %>
<%- partial('google-adsense') %>
</head>
@@ -0,0 +1,15 @@
<section id="comments">
<div id="disqus_thread"></div>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/disqusjs@1.2/dist/disqusjs.css">
<script src="https://cdn.jsdelivr.net/npm/disqusjs@1.1/dist/disqus.js"></script>
<script>
var dsqjs = new DisqusJS({
<% for (var i in theme.disqusjs){ %><%=i%>: '<%=theme.disqusjs[i]%>',<% } %>
shortname: '<%= theme.disqus || config.disqus_shortname %>',
identifier: '<%=url%>',
url: '<%=url%>',
title: '<%=title%>'
});
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</section>

Large diffs are not rendered by default.

0 comments on commit d1d7cfa

Please sign in to comment.
You can’t perform that action at this time.