mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-06 00:33:39 +00:00
38 lines
1.2 KiB
HTML
38 lines
1.2 KiB
HTML
{{- $config := .Site.Params.comments -}}
|
|
|
|
{{- $enabledGlobally := $config.enable -}}
|
|
{{- $disabledGlobally := ( not $enabledGlobally ) -}}
|
|
|
|
{{ $optOut := ( eq .Params.comments false ) }}
|
|
{{ $optIn := .Params.comments }}
|
|
|
|
{{- $enableConditionOne := ( and $disabledGlobally $optIn ) -}}
|
|
{{- $enableConditionTwo := ( and $enabledGlobally ( not $optOut ) ) -}}
|
|
|
|
{{- if ( or $enableConditionOne $enableConditionTwo ) -}}
|
|
|
|
{{- $disqusEnabled := .Site.DisqusShortname -}}
|
|
{{- $issoEnabled := $config.isso.enable -}}
|
|
{{- $staticmanEnabled := $config.staticman.enable -}}
|
|
{{- $utterancesEnabled := $config.utterances.enable -}}
|
|
|
|
{{- if and ( $disqusEnabled | or $issoEnabled | or $staticmanEnabled | or $utterancesEnabled ) ( not .Params.disable_comments) -}}
|
|
<section id='comments' class='comments'>
|
|
<div class='container sep-before'>
|
|
<div class='comments-area'>
|
|
{{- if $disqusEnabled -}}
|
|
{{ partial "comments/disqus" . }}
|
|
{{- else if $issoEnabled -}}
|
|
{{ partial "comments/isso" . }}
|
|
{{- else if $staticmanEnabled -}}
|
|
{{ partial "comments/staticman" . }}
|
|
{{- else if $utterancesEnabled -}}
|
|
{{ partial "comments/utterances" . }}
|
|
{{- end -}}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|