diff options
author | parsiya <parsiya@users.noreply.github.com> | 2021-02-15 09:31:25 +0300 |
---|---|---|
committer | parsiya <parsiya@users.noreply.github.com> | 2021-02-15 09:31:25 +0300 |
commit | 8130d859479ed5674ad3d263870db5aa6b166492 (patch) | |
tree | 5741f9eb89064b36077dd435f5ac457a0e557232 | |
parent | 719b8a1bc04fb1cb9c50cc3443fe8e5f391e42dd (diff) |
Squashed commit of the following:
commit 77e6b30fe896d2f49798bcada4b511ffe119adb2
Author: parsiya <parsiya@users.noreply.github.com>
Date: Sun Feb 14 22:30:52 2021 -0800
fix typo in readme
commit 6e0cc9d4b90fce7062ca5e6e51510f4b76c7de9e
Author: parsiya <parsiya@users.noreply.github.com>
Date: Sun Feb 14 21:57:00 2021 -0800
remove the theme's disqus shortcode and use the internal one, fixes #65
-rwxr-xr-x | README.md | 9 | ||||
-rw-r--r-- | layouts/partials/disqus.html | 17 | ||||
-rw-r--r-- | layouts/partials/post_footer.html | 2 |
3 files changed, 5 insertions, 23 deletions
@@ -527,9 +527,8 @@ not under `params`): disqusShortname = "whatever" ``` -By default, Disqus is not enabled on localhost using `hugo serve`. This can be -disabled (e.g. if you want to test Disqus locally) by commenting the -`if and return` lines in the Disqus partial in `layouts/partials/disqus.html`. +You can disable comments for individual pages by adding `comments: false` to +the frontmatter. ## Twitter Card Twitter card support can be enabled in the config file under `Params`: @@ -633,8 +632,8 @@ There are two workarounds: 2. Put the reference links before the summary divider. ### Empty Posts Link on Homepage -After rebuilding the blog with Hugo v0.57+, you may see an single `Posts` link -in the classic index. Update to Hugo `0.57.2+` (there is an issue with `0.57.1`) +After rebuilding the blog with Hugo v0.57+, you may see a single `Posts` link in +the classic index. Update to Hugo `0.57.2+` (there is an issue with `0.57.1`) and it should work. For more information please see: diff --git a/layouts/partials/disqus.html b/layouts/partials/disqus.html deleted file mode 100644 index b589d78..0000000 --- a/layouts/partials/disqus.html +++ /dev/null @@ -1,17 +0,0 @@ -<div id="disqus_thread"></div> -<script type="text/javascript"> - (function() { - // Don't ever inject Disqus on localhost--it creates unwanted - // discussions from 'localhost:1313' on your Disqus account... - // Comment out these two lines to test Disqus locally - if (window.location.hostname == "localhost") - return; - - var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; - var disqus_shortname = '{{ .Site.DisqusShortname }}'; - dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; - (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); - })(); -</script> -<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> -<a href="http://disqus.com/" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a> diff --git a/layouts/partials/post_footer.html b/layouts/partials/post_footer.html index 43046ac..e5982b1 100644 --- a/layouts/partials/post_footer.html +++ b/layouts/partials/post_footer.html @@ -35,7 +35,7 @@ </p> {{ if .Site.DisqusShortname }} {{ if not (eq .Params.comments false) }} - {{ partial "disqus.html" . }} + {{ template "_internal/disqus.html" . }} {{ end }} {{ end }} </footer> |