Embedding the widget
Everything a webmaster or developer needs to install, configure, and troubleshoot the BOLMOL comment widget on any site.
-
How do I embed the comment widget on my site?
Paste this snippet into any page where you want comments:<div class="bolmol-comments"></div> <script async src="https://cdn-api-js.bolmol.com/v1/comments.js"></script>That is the complete embed. No registration, no API k…
-
What optional attributes can I add to the embed div?
Every attribute is optional. The embed works with the defaults if you add nothing.data-key — bind the widget to a specific thread instead of the current page URL.data-sort — ASC (oldest first, default) or DESC (newest fi…
-
Can I bind the widget to a specific thread instead of the current page URL?
Yes. Add data-key to the embed div:<div class="bolmol-comments" data-key="my-blog/hello-world"></div>The key is normalised the same way as a URL, then hashed to the thread identifier. Use this when the same content lives…
-
How do I change the comment sort order?
Add data-sort="DESC" for newest-first, or leave it out for the default oldest-first order. Sorting is stable and cursor-paginated, so deep threads never trigger a full table scan and always return results in the same ord…
-
How do I set the widget language?
Add data-language="en" to the embed div with the language code you want. BOLMOL ships UI strings for the languages the site supports, including right-to-left languages such as Arabic and Urdu. If a language is not availa…
-
How do I hide the Sign out button inside the widget?
Add data-logout="disabled" to the embed div. The default is enabled. This is useful when the widget is embedded inside a larger account experience and you do not want users signing out of the surrounding product by accid…
-
How do I disable comments on a specific page?
Remove the embed snippet from that page. On the next visit the widget will not render and no new comments can be posted. Existing comments remain in the database and are visible again if you add the snippet back later. T…
-
How do I style the widget to match my site?
The widget inherits your page font by default. To customise colours and radii, override the CSS variables it exposes on the .bolmol-comments wrapper, for example --bmc-accent, --bmc-line, --bmc-bg, and --bmc-danger. All …
-
Does the widget work in single-page applications?
Yes. On the initial page load the widget mounts automatically. When your SPA changes the visible page without a full reload, call window.BolmolComments.mount(container) after the new view is in the DOM and the widget re-…
-
The widget is not showing up on my page. What should I check?
Work through these checks in order:The embed snippet is present in the page source, not only in your template cache.The script tag points to https://cdn-api-js.bolmol.com/v1/comments.js and has not been blocked by a cont…
-
Can I embed the BOLMOL comment widget on any website?
No. The embed itself has no registration step, but the terms of use restrict which websites may use the widget. The following site categories are prohibited and the widget may not be embedded on them:Pornography and adul…
-
Is it safe to embed the widget on my site?
Yes. The widget runs in a sandboxed iframe only for cross-origin session operations, and its visible UI is rendered in your page using DOM APIs that avoid HTML injection. All widget classes are prefixed so it does not in…