diff options
author | Vincent Tam <sere@live.hk> | 2019-07-31 23:37:47 +0300 |
---|---|---|
committer | Vincent Tam <sere@live.hk> | 2019-07-31 23:37:47 +0300 |
commit | b70909edbd3a7ee7026e2cbf14f11e8320426139 (patch) | |
tree | a2a3d088a71682a23ec1f3c5117f04b823f3c7bf | |
parent | 80db685a6b7bb91c76679b745b5815a9798c0f4b (diff) |
Added Isso to config.toml
-rw-r--r-- | exampleSite/config.toml | 1 | ||||
-rw-r--r-- | layouts/_default/single.html | 11 |
2 files changed, 5 insertions, 7 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index d6a9c4e..8f23c0e 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -8,6 +8,7 @@ theme = "huginn" avatar = "img/avatar.png" sitesubtitle = "Blog subtitle" footer = "Powered by [Hugo](https://gohugo.io), theme [Huginn](https://framagit.org/staticman-gitlab-pages/hugo-theme-huginn)" + # isso_server = "" # URL of Isso server # [Params.staticman] # endpoint = "" # URL of your own API deployment (without trailing slash), default: "https://staticman-frama.herokuapp.com" diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 588db47..a208692 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -72,15 +72,12 @@ <script src="{{ $smjs.RelPermalink }}"></script> {{ partial "staticman-comments.html" . }} {{ end }} - {{ if .Site.Params.comments }} - <script defer data-isso="{{ .Site.Params.isso_server }}" - src="{{ .Site.Params.isso_server }}/js/embed.min.js" - async > - </script> + {{ with .Site.Params.isso_server }} + <script defer data-isso="{{ . }}" src="{{ . }}/js/embed.min.js" async></script> <section id="isso-thread"></section> {{ end }} - {{ end }} - {{- define "scripts" -}} +{{ end }} +{{- define "scripts" -}} {{- with .Resources.Match "images/lightbox/*.*" -}} <script src="{{ "js/baguetteBox.min.js" | relURL }}"></script> <script>baguetteBox.run('figure', { |