- git basics
- TypeScript or JavaScript basics
- Node.js >= 22
- Install the dependencies with
npm i
- Create your plugin script in
/plugins(learn more) - Copy the code from plugin-template.ts
- Start coding (documentation)
- Run
npm run check:plugin -- plugins/<lang>/yourPlugin.tsbefore opening a PR — see Testing your plugin
-
Remember to create your plugin inside the language folder corresponding to the language of the novels. These folders are spelled out in full, e.g.
plugins/english/,plugins/portuguese/(see the existing folders underplugins/for the full list). -
The file should have the
.tsextension. Example:plugins/english/nobleMTL.ts -
Add a 96x96px icon at
public/static/src/<lang>/<plugin-name>/icon.png, then reference it from your plugin asicon = 'src/<lang>/<plugin-name>/icon.png'(without thepublic/staticprefix — see PluginBase::icon).[!WARNING] The
<lang>folder here uses the short language code (en,pt-br,fr, ...), which is different from the full language name used for theplugins/<lang>/folder in step 1. Check the existing folders underpublic/static/src/for the codes already in use.
Some sites run on the same off-the-shelf CMS/theme (WordPress themes, Madara, etc.), so instead of
writing a near-identical plugin by hand for each one, this repo generates them from a shared
template. That system lives in plugins/multisrc/, where each subfolder is one generator —
for example plugins/multisrc/lightnovelwp/ covers sites using the LightNovel WordPress theme, and
plugins/multisrc/madara/ covers sites using the Madara theme.
Adding a new source to an existing generator (the common case — check plugins/multisrc/ first
to see if a generator already matches your target site's CMS):
- Open the generator's folder, e.g.
plugins/multisrc/lightnovelwp/, and add an entry for your site to itssources.json. - Run
npm run build:multisrcto materialize the actual plugin file(s) intoplugins/<lang>/<name>[<generator>].ts. - Follow the generator's own
README.mdfor anything specific to it — icon handling, available filters, andsources.jsonfields differ between generators (compareplugins/multisrc/lightnovelwp/README.mdandplugins/multisrc/madara/README.mdfor examples). - Test your plugin the same way you would a single-source one.
Adding a new generator (only if no existing generator's CMS matches your target site) is a
larger undertaking — read an existing generator's generator.js and template.ts first to see the
shape expected by plugins/multisrc/generate-multisrc-plugins.js, which drives all generators via
npm run build:multisrc.