diff options
author | Curtis Timson <curt@live.co.uk> | 2018-02-11 16:41:29 +0300 |
---|---|---|
committer | Curtis Timson <curt@live.co.uk> | 2018-02-11 16:41:29 +0300 |
commit | 70dc1088a55c104f0d29bc994a2462ec5cdabfbf (patch) | |
tree | a7450894e79d8a240b8101a7fa3884c8ecd25b5a /layouts | |
parent | 12ca6eeb810eb21f9ca720d053fcee08ca85787b (diff) |
:sparkles: Add disqusid to posts and display disqus
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/single.html | 38 | ||||
-rw-r--r-- | layouts/partials/scripts/disqus.html | 8 |
2 files changed, 23 insertions, 23 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 732cd49..a42c431 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -23,26 +23,26 @@ <!-- Main --> <div id="main-wrapper"> - <div class="container"> - - <!-- Content --> - <article class="box post"> - <a href="#" class="image featured"><img src="{{ .Site.BaseURL }}{{ .Params.image }}" alt="" /></a> - <header> - <h2>{{ .Title }}</h2> - {{ if not .Date.IsZero }} - <p>Posted {{ .Date.Format "2 Jan 2006" }}</p> - {{ end }} - </header> - {{ .Content }} - </article> - - - - </div> - </div> + <div class="container"> + + <!-- Content --> + <article class="box post"> + <a href="#" class="image featured"><img src="{{ .Site.BaseURL }}{{ .Params.image }}" alt="" /></a> + <header> + <h2>{{ .Title }}</h2> + {{ if not .Date.IsZero }} + <p>Posted {{ .Date.Format "2 Jan 2006" }}</p> + {{ end }} + </header> + {{ .Content }} + </article> + + <div id="disqus_thread"></div> + + </div> + </div> - {{ partial "footer/index.html" . }} + {{ partial "footer/index.html" . }} </div> diff --git a/layouts/partials/scripts/disqus.html b/layouts/partials/scripts/disqus.html index d17e025..6ca2a83 100644 --- a/layouts/partials/scripts/disqus.html +++ b/layouts/partials/scripts/disqus.html @@ -4,12 +4,12 @@ /** * 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 + this.page.url = {{ .Permalink }}; // Replace PAGE_URL with your page's canonical URL variable + this.page.identifier = {{ .Params.disqusid }}; // 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'; |