Home

Awesome

talaria

talaria is a simple commenting system for static sites. It uses Github Issues or Gists as backend.

Build Status

Compatability Notice: talaria targets ES2015, as such IE is not supported!

Getting started

Installation

Once the rewrite becomes stable, I will create a new github release. If you are feeling adventourus, feel free to clone the repo and explore (it's only ~200LOC).

I will eventually get around to releasing talaria on npm but until that time, github releases will have to suffice.

Requirements

For talaria to function, your content has to comply with certain structural requirements. talaria requires any content that you want to have comments for (such as a blog post), to have an <a> tag with a href that uniquely identifies said content (a permalink). All permalinks on a page should be queriable from a single document.querySelectorAll, hence must have a shared class attribute (e.g. permalink).

Additionally, talaria is currently hardcoded to attach the comments as the last child element of the parentElement of your permalink, so overall your content should be structured as similar to this:

<body>
...
<article>
<a class="permalink" href="a-permalink">Title</a>
<p>...</p>
<!-- comments will be added here  -->
</article>
</body>

Initializing talaria

Start by including <script src="dist/talaria.js"></script> somewhere on you page (preferably towards then end of <body>). You now have access to the global talaria variable. To initialize talaria, add a second <script> below the first one:

<script src="<path-to-talaria>/dist/talaria.js"></script>
<script>
  var t = new talaria.Talaria({
      backend: talaria.Backend.Gists,
      mappingUrl: 'mappings.json',
      github_username: 'm2w',
      github_repository: 'talaria',
      ignoreErrors: true
    });
    t.run();
</script>

Configuring talaria

Most of talaria's functionality can be customized through the configuration object passed to the Talaria constructor. Available configuration options are:

Customizing talaria's look'n'feel

talaria ships with very simple styles that mostly mirror github's own styles. These styles are available under dist/talaria{.css|.min.css}.

All styles are encapsulated using a talaria- prefix and should therefore not "leak". If you wish to customize the styles, please look into both lib/talaria.css and lib/talaria.ts as to what selectors you should provide stylings for.

Gotchas

Development

I would love feedback on the code, bug reports, feature requests or even pull requests!

The goal for talaria is to have a small, clean and well documented code base. You can help make that a reality :)

To get started hacking on talaria:

  1. Clone this repo.
  2. Run yarn install inside the repo (yarn is an alternative to npm)
  3. See yarn run for a list of commands - all of talaria's build steps are package.json scripts

Trivia

talaria are the winged sandals worn by Hermes in Greek mythology.