murmlo-embed
v1.0.0
Published
Murmlo comments button — add a discussion link to any website with one line of HTML
Downloads
8
Maintainers
Readme
murmlo-embed
Add a Murmlo comments button to any website with one line of HTML.
Quick Start
<a class="murmlo-comments-button">Comments</a>
<script src="https://cdn.jsdelivr.net/npm/murmlo-embed@1/embed.js"></script>That's it. The script automatically:
- Adds the animated Murmlo logo
- Fetches the comment count for the current page
- Shows a count badge when there are comments
- Opens the Murmlo app on mobile (iOS/Android) or web on desktop
Themes
Add data-murmlo-theme to change the look:
<a class="murmlo-comments-button" data-murmlo-theme="brand">Comments</a>
<a class="murmlo-comments-button" data-murmlo-theme="dark">Comments</a>
<a class="murmlo-comments-button" data-murmlo-theme="light">Comments</a>
<a class="murmlo-comments-button" data-murmlo-theme="dark-mono">Comments</a>
<a class="murmlo-comments-button" data-murmlo-theme="light-mono">Comments</a>| Theme | Description |
|-------|-------------|
| (default) | Transparent background, inherits text color, green logo |
| brand | Green background, white text and logo |
| dark | Dark background, white text, green logo |
| light | White background, dark text, green logo |
| dark-mono | Dark background, all white, no green |
| light-mono | White background, all dark, no green |
Variants
Button (with border):
<a class="murmlo-comments-button">Comments</a>Link (inline, no border):
<a class="murmlo-comments-link">Comments</a>Count Only
Inject just the comment count into any element:
<button>Discuss (<span class="murmlo-count">...</span>)</button>
<script src="https://cdn.jsdelivr.net/npm/murmlo-embed@1/embed.js"></script>Custom Text
The button text is yours — write anything:
<a class="murmlo-comments-button">Komentarze</a>
<a class="murmlo-comments-button">Join the Discussion</a>
<a class="murmlo-comments-button">Talk about this</a>Self-Hosting
Download embed.js and serve it from your own server:
<script src="/js/embed.js"></script>How It Works
- The script prepends the Murmlo M logo to your button
- Fetches comment count from
api.murmlo.comfor the current page - Appends a count badge if there are comments
- On click: opens Murmlo app (mobile) or Murmlo web (desktop)
- If the Murmlo Chrome extension is installed, opens the sidepanel instead
WordPress
For WordPress sites, use the Murmlo Global Comments plugin instead — it handles everything automatically.
License
MIT
