fix: comment provider not found (#2165)

Hugo v0.80.0 `Exists` function requires file extension unlike Hugo's Partial statement
This commit is contained in:
Arho Huttunen 2021-02-16 00:41:17 +02:00 committed by GitHub
commit 3cf9f6cdee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,7 @@
{{ $provider := trim (site.Params.comments.provider | lower) " " }}
{{ if $provider }}
{{ $provider_tpl := printf "partials/comments/%s" $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 }}