2.0.0-rc0 • Published 4 years ago
dendron-publish-drawio v2.0.0-rc0
Export Diagrams.net diagrams during Dendron site publishing
Node module for exporting Diagrams.net (Draw.io) diagrams embedded in a published Dendron site to SVG.
Usage
Embed your diagrams in your notes as if they were images:
If your diagram has multiple pages, specify the page number (zero-indexed; defaults to 0) in the URL:
Installation
From the root of your Dendron workspace (where the dendron.code-workspace and dendron.yml files are), install the plugin:
npm install --save-dev dendron-publish-drawioPublishing a Dendron site involves running the following commands:
npx dendron publish init
npx dendron publish build --wsRoot . --vault public --sitemap
cd .next/
npm run exportWe need to add a step, between dendron publish build and npm run export:
npx dendron publish init
npx dendron publish build --wsRoot . --vault public --sitemap
npx dendron-publish-drawio
cd .next/
npm run exportNote that if you customise Dendron's site:assetsPrefix option (or set it via --overrides=assetsPrefix=...) you'll need to set the DENDRON_ASSETS_PREFIX environment variable to the same value when running dendron-publish-drawio:
export DENDRON_ASSETS_PREFIX=/etc npx dendron-publish-drawio