Skip to content

Commit

Permalink
disqus downward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
geekrainy committed Sep 18, 2018
1 parent 9e429f5 commit 3bd335e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions layout/_partial/article.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
}) %>
<% } %>
</div>
<% if (post.comments && (theme.disqus_shortname || theme.valine.enable)){ %>

<% if (post.comments && (theme.disqus_shortname || theme.valine.enable || config.disqus_shortname)){ %>
<section id="comments" class="white-box">
<% if (theme.disqus_shortname){ %>
<% if (theme.disqus_shortname || config.disqus_shortname){ %>
<div id="disqus_thread">
<noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</div>
Expand Down
4 changes: 2 additions & 2 deletions layout/_partial/scripts.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

<!-- Disqus -->

<% if (theme.disqus_shortname){ %>
<% if (theme.disqus_shortname || config.disqus_shortname){ %>
<script type="text/javascript">
var disqus_shortname = '<%= theme.disqus_shortname %>';
var disqus_shortname = '<%= theme.disqus_shortname || config.disqus_shortname %>';
<% if (page.permalink){ %>
var disqus_url = '<%= page.permalink %>';
<% } %>
Expand Down

0 comments on commit 3bd335e

Please sign in to comment.