comments.html 514 B

1234567891011121314151617
  1. {{ $provider := trim (site.Params.features.comment.provider | lower) " " }}
  2. {{ if $provider }}
  3. {{ $provider_tpl := printf "partials/comments/%s.html" $provider }}
  4. {{ $provider_exists := templates.Exists $provider_tpl }}
  5. {{ if not $provider_exists }}
  6. {{ errorf "The '%s' comment provider was not found." $provider }}
  7. {{ end }}
  8. {{ $commentable_page := .Params.commentable }}
  9. {{ if $commentable_page }}
  10. <section id="comments">
  11. {{ partial $provider_tpl . }}
  12. </section>
  13. {{ end }}
  14. {{ end }}