Local sandbox plugins
What this demonstrates
The sandbox is not limited to npm packages. Two private plugins live in
/home/loca/dev/quartz-sandbox/sandbox/plugins/ and are loaded by relative source from the
sandbox engine:
- sandbox-reading-stats is a transformer. It adds a reading-time badge to published
article content, with
data-sandbox-reading-stats,data-words, anddata-minutes. - sandbox-manifest is an emitter. It writes
sandbox-manifest.jsonnext to the build output, containing sorted entries for the post-filter published content set (including generated folder/tag pages that Quartz appends to emitter content; redirect-only aliases and arbitrary output files are not entries).
These are real TypeScript plugins with manifests and typed factories, not mock rows in this page.
Configuration used
- source: ../plugins/sandbox-reading-stats
enabled: true
order: 900
options:
wordsPerMinute: 220
locale: en
- source: ../plugins/sandbox-manifest
enabled: true
order: 900
options:
fileName: sandbox-manifest.json
pretty: trueThe entries above are copied verbatim from the final config. Both intentionally share order
900; their relative order in the list is stable, and sandbox-reading-stats appears before
the encrypted-pages transformer so the article badge remains visible on normal pages.
Content used
This page and every ordinary article page contain enough prose for the reading-stats transformer to calculate non-zero words and minutes. The frontmatter supplies the title and tags that the manifest records.
What the rendered output proves
The final article DOM contains a badge with data-sandbox-reading-stats, a numeric
data-words attribute and a numeric data-minutes attribute. The final dist also contains
sandbox-manifest.json; its JSON is parseable, pretty-printed, sorted, and includes this
page’s slug/route, title and tags. The manifest’s entries are the emitter’s observed content,
not a hand-authored copy.
safe_for_shared_engine
false — these plugins are deliberately private to this showcase and resolve from a path that does not exist in the shared checkout. They demonstrate the extension contract without creating a dependency or namespace for the 51 shared wikis.