Skip to content

Commit

Permalink
feat: read disqus_shortname from theme config (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang authored Apr 8, 2024
1 parent 0d67c34 commit 2489697
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions layout/_partial/after-footer.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% if (config.disqus_shortname){ %>
<% if (theme.disqus_shortname){ %>
<script>
var disqus_shortname = '<%= config.disqus_shortname %>';
var disqus_shortname = '<%= theme.disqus_shortname %>';
<% if (page.permalink){ %>
var disqus_url = '<%= page.permalink %>';
<% } %>
Expand Down
4 changes: 2 additions & 2 deletions layout/_partial/article.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</div>
<footer class="article-footer">
<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>
<% if (post.comments && config.disqus_shortname){ %>
<% if (post.comments && theme.disqus_shortname){ %>
<a href="<%- post.permalink %>#disqus_thread" class="article-comment-link"><span class="fa fa-comment"><%= __('comment') %></span></a>
<% } %>
<% if (post.comments && theme.valine.enable && theme.valine.appId && theme.valine.appKey ){ %>
Expand All @@ -41,7 +41,7 @@
<% } %>
</article>

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

0 comments on commit 2489697

Please sign in to comment.