Skip to content

Commit e7b1861

Browse files
feat: read disqus_shortname from theme config (#93)
1 parent a65ddd4 commit e7b1861

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Deploy preview site
33
on:
44
# Runs on pushes targeting the default branch
55
push:
6-
branches: [$default-branch]
6+
branches: [master]
77

88
# Allows you to run this workflow manually from the Actions tab
99
workflow_dispatch:

_config.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ google_analytics:
2121
rss:
2222

2323
comment_provider: facebook
24+
# Disqus comment
25+
disqus_shortname:
2426
# Facebook comment
2527
facebook:
26-
appid: 123456789012345
28+
appid: # <appId>
2729
comment_count: 5
2830
comment_width: 840
2931
comment_colorscheme: light

layout/_partial/after_footer.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<%- js('js/jquery.imagesloaded.min.js') %>
33
<%- js('js/gallery.js') %>
44

5-
<% if (config.disqus_shortname){ %>
5+
<% if (theme.disqus_shortname){ %>
66
<script>
7-
var disqus_shortname = '<%= config.disqus_shortname %>';
7+
var disqus_shortname = '<%= theme.disqus_shortname %>';
88
99
(function(){
1010
var dsq = document.createElement('script');

layout/_partial/article.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<a href="<%- url_for(item.path) %>#more" class="more-link"><%= theme.excerpt_link %></a>
2525
</div>
2626
<% } %>
27-
<% if (item.comment && config.disqus_shortname){ %>
27+
<% if (item.comments && theme.disqus_shortname){ %>
2828
<div class="alignright">
2929
<a href="<%- item.permalink %>#disqus_thread" class="comment-link">Comments</a>
3030
</div>

layout/_partial/comment.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
if (theme.facebook) { %>
77
<%- partial('_partial/facebook_comment', {fbConfig: theme.facebook}) %>
88
<% } %>
9-
<% } else if(config.disqus_shortname) { %>
9+
<% } else if(theme.disqus_shortname) { %>
1010
<div id="disqus_thread">
1111
<noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
1212
</div>

0 commit comments

Comments
 (0)