Skip to content

Commit 2489697

Browse files
feat: read disqus_shortname from theme config (#213)
1 parent 0d67c34 commit 2489697

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

layout/_partial/after-footer.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<% if (config.disqus_shortname){ %>
1+
<% if (theme.disqus_shortname){ %>
22
<script>
3-
var disqus_shortname = '<%= config.disqus_shortname %>';
3+
var disqus_shortname = '<%= theme.disqus_shortname %>';
44
<% if (page.permalink){ %>
55
var disqus_url = '<%= page.permalink %>';
66
<% } %>

layout/_partial/article.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</div>
2525
<footer class="article-footer">
2626
<a data-url="<%- post.permalink %>" data-id="<%= post._id %>" data-title="<%= post.title %>" class="article-share-link"><span class="fa fa-share"><%= __('share') %></span></a>
27-
<% if (post.comments && config.disqus_shortname){ %>
27+
<% if (post.comments && theme.disqus_shortname){ %>
2828
<a href="<%- post.permalink %>#disqus_thread" class="article-comment-link"><span class="fa fa-comment"><%= __('comment') %></span></a>
2929
<% } %>
3030
<% if (post.comments && theme.valine.enable && theme.valine.appId && theme.valine.appKey ){ %>
@@ -41,7 +41,7 @@
4141
<% } %>
4242
</article>
4343

44-
<% if (!index && post.comments && config.disqus_shortname){ %>
44+
<% if (!index && post.comments && theme.disqus_shortname){ %>
4545
<section id="comments">
4646
<div id="disqus_thread">
4747
<noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>

0 commit comments

Comments
 (0)