diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 3bd38b5..2423a98 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -155,10 +155,24 @@
{{ partial "navigators/next-prev-navigator.html" . }}
- - {{ if site.DisqusShortname }} - {{ partial "disqus.html" . }} + + + {{ with site.Params.features.comment }} + {{ if .enable }} + + {{ if .disqus.shortName }} + {{ partial "disqus.html" . }} + + {{ else if .valine }} + {{ partial "valine.html" . }} + {{ end }} + {{ end }} {{ end }} + + {{ if site.DisqusShortname }} + {{ partial "disqus.html" . }} + {{ end }} + diff --git a/layouts/partials/disqus.html b/layouts/partials/disqus.html index 71fef21..4ccd9e2 100644 --- a/layouts/partials/disqus.html +++ b/layouts/partials/disqus.html @@ -1,3 +1,8 @@ +{{ $disqusShortName := site.DisqusShortname }} +{{ if site.Params.features.disqus.shortName }} + {{ $disqusShortName = site.Params.features.disqus.shortName }} +{{ end }} +
+ +