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).

  1. Look up the HTML snippet in you domain properties.
  2. Create a comment partial template in layouts/partials/comments.html:
<!-- Your HTML snippet goes here -->
<script defer src=""></script>
  1. Reference this partial template in the appropriate template located under layouts. For example, layouts/_default/single.html:
{{ define "main" }}
    <!-- Main content -->
    {{ .Content }}

    <!-- Comentario comments -->
    {{- partial "comments" . }}
{{ end }}

Adjust the above code as you see fit.