Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dataCobra/hugo-vitae.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordataCobra <datacobra@thinkbot.de>2021-03-06 16:27:02 +0300
committerdataCobra <datacobra@thinkbot.de>2021-03-06 16:27:02 +0300
commitb699b784e2d3e468763f270db5c68f65f1e0f51d (patch)
tree3a3f719557737be140ea64b0780f2736d8e3c3c2
parent8c360c361e001e70b5291232759bd72a417c3221 (diff)
Refactoring of comments feature
-rw-r--r--layouts/partials/comments.html6
-rw-r--r--layouts/partials/comments/disqus.html20
2 files changed, 13 insertions, 13 deletions
diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html
index a2c66aa..36c8459 100644
--- a/layouts/partials/comments.html
+++ b/layouts/partials/comments.html
@@ -1,5 +1,5 @@
-{{ if eq site.Params.comments.engine "disqus" }}
+{{- if eq site.Params.comments.engine "disqus" }}
{{ partial "comments/disqus.html" . }}
-{{ else if eq site.Params.comments.engine "commento" }}
+{{- else if eq site.Params.comments.engine "commento" }}
{{ partial "comments/commento.html" . }}
-{{ end }}
+{{- end }}
diff --git a/layouts/partials/comments/disqus.html b/layouts/partials/comments/disqus.html
index 54b2f59..d99a1c3 100644
--- a/layouts/partials/comments/disqus.html
+++ b/layouts/partials/comments/disqus.html
@@ -1,14 +1,14 @@
<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...
- if (window.location.hostname == "localhost")
- return;
- var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
- var disqus_shortname = '{{ .Site.Params.comments.disqus.shortname }}';
- dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
- (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
- })();
+(function() {
+// Don't ever inject Disqus on localhost--it creates unwanted
+// discussions from 'localhost:1313' on your Disqus account...
+if (window.location.hostname == "localhost")
+ return;
+var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+var disqus_shortname = '{{ .Site.Params.comments.disqus.shortname }}';
+dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
+(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+})();
</script>
<noscript>{{ i18n "nojscomments" }}</noscript>