https://github.com/LukeCarrier/dendron-publish-drawio
  
  
    Export Diagrams.net diagrams during Dendron site publishing 
    https://github.com/LukeCarrier/dendron-publish-drawio
  
        Last synced: 7 months ago 
        JSON representation
    
Export Diagrams.net diagrams during Dendron site publishing
- Host: GitHub
 - URL: https://github.com/LukeCarrier/dendron-publish-drawio
 - Owner: LukeCarrier
 - License: mit
 - Archived: true
 - Created: 2022-01-09T17:05:32.000Z (almost 4 years ago)
 - Default Branch: main
 - Last Pushed: 2024-06-17T22:38:29.000Z (over 1 year ago)
 - Last Synced: 2025-03-28T04:48:50.207Z (7 months ago)
 - Language: JavaScript
 - Homepage:
 - Size: 773 KB
 - Stars: 4
 - Watchers: 1
 - Forks: 0
 - Open Issues: 2
 - 
            Metadata Files:
            
- Readme: README.md
 - License: LICENSE.md
 
 
Awesome Lists containing this project
- awesome-dendron - Export and Publish Draw.io Diagrams - Use this tool to embed [draw.io / diagrams.net](https://www.diagrams.net/) diagrams in your published Dendron notes and documentation. (Dendron Enhancers / Other)
 - awesome-dendron-poc - Export and Publish Draw.io Diagrams - Use this tool to embed [draw.io / diagrams.net](https://www.diagrams.net/) diagrams in your published Dendron notes and documentation. (Dendron Enhancers / Other)
 
README
          # Export Diagrams.net diagrams during Dendron site publishing
Node module for exporting [Diagrams.net (Draw.io)](https://about.diagrams.net/) diagrams embedded in a published [Dendron](https://dendron.so/) site to SVG.
---
## Usage
Embed your diagrams in your notes as if they were images:
```markdown

```
If your diagram has multiple pages, specify the page number (zero-indexed; defaults to 0) in the URL:
```markdown

```
## Installation
From the root of your Dendron workspace (where the `dendron.code-workspace` and `dendron.yml` files are), install the plugin:
```console
npm install --save-dev dendron-publish-drawio
```
Publishing a Dendron site involves running the following commands:
```console
npx dendron publish init
npx dendron publish build --wsRoot . --vault public --sitemap
cd .next/
npm run export
```
We need to add a step, between `dendron publish build` and `npm run export`:
```console
npx dendron publish init
npx dendron publish build --wsRoot . --vault public --sitemap
npx dendron-publish-drawio
cd .next/
npm run export
```
Note that if you customise Dendron's [`site:assetsPrefix`](https://wiki.dendron.so/notes/f2ed8639-a604-4a9d-b76c-41e205fb8713/#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`:
```console
export DENDRON_ASSETS_PREFIX=/etc npx dendron-publish-drawio
```