mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-20 02:16:40 +00:00
See https://discord.com/channels/722225264733716590/738924091511144489/1406144559188283494 See https://gohugo.io/templates/new-templatesystem-overview/
18 lines
515 B
HTML
18 lines
515 B
HTML
{{ $provider := trim (site.Params.features.comment.provider | lower) " " }}
|
|
|
|
{{ if $provider }}
|
|
{{ $provider_tpl := printf "_partials/comments/%s.html" $provider }}
|
|
{{ $provider_exists := templates.Exists $provider_tpl }}
|
|
{{ if not $provider_exists }}
|
|
{{ errorf "The '%s' comment provider was not found." $provider }}
|
|
{{ end }}
|
|
|
|
{{ $commentable_page := .Params.commentable }}
|
|
|
|
{{ if $commentable_page }}
|
|
<section id="comments">
|
|
{{ partial $provider_tpl . }}
|
|
</section>
|
|
{{ end }}
|
|
{{ end }}
|