<div class="post-comment" data-comment="disqus"> <span class="post-comment-notloaded"> <i class="iconfont icon-chatbox-ellipses-sharp"></i> {{ i18n "postComment" }} </span> <div id="disqus_thread" style="display: none;"></div> <script> function loadComment() { var commentArea = document.querySelector('.post-comment'); var disqus_config = function () { this.page.url = '{{ .Permalink }}'; this.page.identifier = '{{ .File.ContentBaseName }}'; }; var s = document.createElement('script'); s.src = 'https://' + '{{ .Site.Params.disqusShortname }}' + '.disqus.com/embed.js'; s.setAttribute('data-timestamp', +new Date()); document.querySelector('#disqus_thread').removeAttribute('style'); (document.body || document.head).appendChild(s); document.querySelector('span.post-comment-notloaded').setAttribute('style', 'display: none;'); } </script> </div>