Link Search Menu Expand Document (external link)

Plug-in API

Indiekit is a Node.js Express server designed to interoperate with IndieWeb protocols and features. Plug-ins allow new features to be added, and different protocols and specifications to be supported.

A plug-in can provide any of the following features:

Anatomy of a plug-in

A plug-in is a Class with an init() function that is used to register endpoints, presets, stores and syndicators. You can also use the init() function to modify Indiekit’s configuration. For example:

export default class PluginName {
  constructor() { = "plugin-name";
    this.meta = import.meta; = "Plugin name";

  syndicate() {}

  init(Indiekit) {
    // Register a plug-in method

    // Update Indiekit’s configuration = "bar"

Folder structure

Indiekit expects plug-in packages to provide assets in the following directories:

Folder name Contents
/assets Static files (for example images, stylesheets). Optional.
/includes Nunjucks partials used in views. Optional.
/locales Localisation files. Optional.
/views Nunjucks view templates. Optional.

You can also choose to provide an icon for your plug-in. This should be a square shaped SVG provided at /assets/icon.svg.