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

github.com/curttimson/hugo-theme-dopetrope.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCurtis Timson <curt@live.co.uk>2018-02-11 16:30:03 +0300
committerCurtis Timson <curt@live.co.uk>2018-02-11 16:30:03 +0300
commit98d3f1f02d0bd082ce777c68210a606abdaa0b2b (patch)
treef1c9d44831316e92e39355da5f54d1d9aaa7a686
parentfbab234e878457bddf431593f1d8ab8656673a84 (diff)
:tada: Initial disqus script insert
-rw-r--r--exampleSite/config-prod.toml3
-rw-r--r--exampleSite/config.toml3
-rw-r--r--layouts/partials/scripts.html20
3 files changed, 24 insertions, 2 deletions
diff --git a/exampleSite/config-prod.toml b/exampleSite/config-prod.toml
index 8345c70..dc8ef03 100644
--- a/exampleSite/config-prod.toml
+++ b/exampleSite/config-prod.toml
@@ -57,4 +57,5 @@ theme = "../.."
phone = "(800) 000-0000"
[params.settings]
- googleanalytics = "UA-113904582-2" \ No newline at end of file
+ googleanalytics = "UA-113904582-2"
+ disqus = "hugo-dopetrope" \ No newline at end of file
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 6b2852d..1e6fa58 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -57,4 +57,5 @@ theme = "../.."
phone = "(800) 000-0000"
[params.settings]
- googleanalytics = "UA-113904582-1" \ No newline at end of file
+ googleanalytics = "UA-113904582-1"
+ disqus = "hugo-dopetrope" \ No newline at end of file
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
index 8eb56ab..afd339b 100644
--- a/layouts/partials/scripts.html
+++ b/layouts/partials/scripts.html
@@ -17,7 +17,27 @@
gtag('config', {{ .Site.Params.Settings.googleanalytics }});
</script>
+{{ end }}
+
+{{ if .Site.Params.Settings.disqus }}
+<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 LINE
+ var d = document, s = d.createElement('script');
+ s.src = 'https://hugo-dopetrope.disqus.com/embed.js';
+ s.setAttribute('data-timestamp', +new Date());
+ (d.head || d.body).appendChild(s);
+ })();
+ </script>
{{ end }}
{{ partial "scriptscustom.html" . }} \ No newline at end of file