Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installing Plugins

A plugin is a crate compiled into the application. Installing one records it and rebuilds.

StateWhereChanging it costs
Which plugins are compiled inplugins/plugins.tomla rebuild
Which of them are enabledthe databasea restart

Add one

$ lat plugin add ../acme-blog-plugin
$ lat plugin add https://github.com/acme/blog-plugin
$ cargo build

A checkout outside the project is linked into plugins/, not copied. --as <folder> picks the folder name.

A plugin added from a git URL is vendored: its files are copied in without their .git folder, and source in the list records the URL.

In a static website (see Static Website) the first lat plugin add writes the site’s Cargo project, and only a plugin whose marker says static = true is accepted.

Edit the list

# plugins/plugins.toml
[[plugin]]
path = "acme-blog"

[[plugin]]
path = "acme-blog"
source = "https://github.com/acme/blog-plugin"
CommandDescription
lat plugin addRecords a plugin and syncs.
lat plugin removeDrops the entry. --delete removes the folder; a link only loses its link.
lat plugin syncRegenerates plugins-manifest/ from the list. Run after editing by hand.
lat plugin listPrints the plugins the application compiles in.
lat plugin checkChecks each installed plugin against the expected layout.
lat doctorChecks the list and the manifest agree.

Two entries resolving to one crate are refused.

Enable and disable

Settings → Plugins turns a compiled-in plugin off without a rebuild. The change applies at the next start: a disabled plugin’s migrations do not run, it contributes nothing, and anything depending on it is skipped. Its tables stay.