Skip to content

Commit

Permalink
Replace template google_analytics_async by google_analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
mfg92 committed Nov 7, 2023
1 parent e683e61 commit 3af69b8
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@

{{ template "_internal/twitter_cards.html" . }}
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/google_analytics_async.html" . }}
{{ template "_internal/google_analytics.html" . }}
32 changes: 32 additions & 0 deletions layouts/posts/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,39 @@
<article role="article">
{{ .Content }}
</article>

</div>

<div class="show-comments">
<button id="show-comments-button" onclick="disqus();return false;">Show Comments</button>
</div>

<div id="disqus_thread"></div>

<script>
var disqus_loaded = false;
/**
* 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 disqus() {
if (!disqus_loaded) {
document.getElementById("show-comments-button").style.display = "none";
disqus_loaded = true;
var d = document, s = d.createElement('script');
s.src = 'https://matze0.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
}
};
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>

{{ end }}

{{ define "bottom-menu" }}
Expand Down

0 comments on commit 3af69b8

Please sign in to comment.