Embed Client-Side Comments with a Wee Bit o' JavaScript

This page demonstrates how to embed JamComments with a little bit of client-side JavaScript. It's a great approach if you, for whatever reason, aren't interested in integrating JamComments in your build process or on a server. Just drop in few lines of code on the front end, and you're good to go.

This is all the JavaScript it takes.

<script type="module">
    import {
        initialize
    } from "https://unpkg.com/@jam-comments/[email protected]/dist/index.es.js";

    initialize("#comments", {
        path: window.location.pathname,
        apiKey: "TAXATION-IS-THEFT-42",
        domain: "jamcomments.com",
        environment: "production",
    }).then((el) => el.classList.add('is-loaded'));
</script>

See the documentation for more information on setting this up.