Embedding comments

How to add comments to a web page by embedding Comentario

The whole point of installing Comentario is, of course, using it as a web comment engine.

Or, in other words, its ability to add comment threads to web pages.

Adding comments to a web page

In order to add (embed) comments to your website, you’ll need to do the following:

  1. Register a new domain in the Administration UI.
  2. Add an HTML snippet to every web page that’s supposed to have comment functionality.

The HTML snippet is displayed in domain properties and looks like this:

<script defer src="https://example.com/comentario.js"></script>
<comentario-comments></comentario-comments>

As you can see, it consists of two tags: a <script> and a <comentario-comments>.

Script tag

The <script> tag is the first of the two elements required to embed comments onto a page. It provides the entire commenting functionality, including comment layout, content, and styling.

Comments tag

The <comentario-comments> tag is the second required element on a comment page (with the script tag being the first). It represents a web component that provides the comment functionality.

See also