You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today I found an issue where after integrating with Disqus, adding comments: false to the front matter of my "About me" page doesn't let the comment box go away.
After digging for awhile, it is found that adding the following block to the footer.ejs solves the problem,
<%if(page.comments&&config.disqus_shortname){%><divid="disqus_thread"></div><script>/** * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS. * LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables *//* var disqus_config = function () { this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable }; */(function(){// DON'T EDIT BELOW THIS LINEvard=document,s=d.createElement('script');s.src='https://<disqus-short-name.disqus.com/embed.js';s.setAttribute('data-timestamp',+newDate());(d.head||d.body).appendChild(s);})();</script><noscript>Please enable JavaScript to view the <ahref="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><%}%>
Hi,
Today I found an issue where after integrating with Disqus, adding
comments: false
to the front matter of my "About me" page doesn't let the comment box go away.After digging for awhile, it is found that adding the following block to the
footer.ejs
solves the problem,This is inspired by the post here hexojs/hexo-theme-landscape#178.
I am not a JavaScript developer, hence not sure if this is the best option to solve this issue.
Please help evaluate and make updates as you see fit.
Thanks!
The text was updated successfully, but these errors were encountered: