Comments tag

The <comentario-comments> tag is required to embed comments on a page

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.

This tag marks the location for displayed comments.

After Comentario engine is initialised, the comments will appear inside the corresponding HTML element — as well as the profile bar, comment editor, and other relevant elements.

Customising the comments

You can further customise Comentario by adding attributes to the <comentario-comments> tag. You can use the Options button next to the snippet to open the option editor.

Comentario recognises the following tag attributes:

AttributeDescriptionDefault value
auto-initWhether to automatically initialise Comentariotrue
auto-non-interactive-ssoWhether to automatically trigger non-interactive SSO authenticationfalse
css-overrideAdditional CSS stylesheet URL, or false to disable loading styles altogether
langLanguage for the embedded ComentarioPage language or en
live-updateWhether Live update of comments is enabled on the pagetrue
max-levelMaximum comment visual nesting level. Set to 1 to disable nesting altogether10
no-fontsSet to true to avoid applying default Comentario fontsfalse
page-idOverrides the path (URL) of the current page

Below is an example of a customised <comentario-comments> tag:

<comentario-comments auto-init="false"

Attribute: auto-init

The auto-init attribute of the comments tag controls whether the embedded Comentario comments will be rendered automatically upon page load.

Attribute: auto-non-interactive-sso

The auto-non-interactive-sso attribute of the comments tag allows to automatically trigger the non-interactive SSO login flow upon page load.

Attribute: css-override

The css-override attribute of the comments tag can be used to change or disable standard Comentario styles for embedded comments.

Attribute: lang

The lang attribute of the comments tag specifies the language that should be used for the embedded Comentario comments.

Attribute: live-update

The live-update attribute of the comments tag controls whether live updates of comments on the page is enabled.

Attribute: max-level

The max-level attribute of the comments tag allows to limit the displayed nesting (indentation) of embedded comments.

Attribute: no-fonts

The no-fonts attribute of the comments tag allows to disable applying standard Comentario root font (Source Sans Pro) in embedded comments.

Attribute: page-id

The page-id attribute of the comments tag can be used to provide a mapping between path(s) and a page that displays embedded comments.

See also