This documentation site is about the unstable (upcoming) Comentario version.
Switch to the stable version »
Hugo static website
How to integrate Comentario comments with a website built in Hugo
Hugo is a popular, powerful static website generator written in Go (also used to build this documentation by the way).
- Look up the HTML snippet in you domain properties.
- Create a comment partial template in
layouts/partials/comments.html
:
<!-- Your HTML snippet goes here -->
<script defer src="https://example.com/comentario.js"></script>
<comentario-comments></comentario-comments>
- Reference this partial template in the appropriate template located under
layouts
. For example,layouts/_default/single.html
:
{{ define "main" }}
<main>
<!-- Main content -->
{{ .Content }}
<!-- Comentario comments -->
{{- partial "comments" . }}
</main>
{{ end }}
Adjust the above code as you see fit.