* origin/develop:
chore: Update cspell
Update docs
fix: docs build command
chore: Rebuild docs if linting fails
chore: Format Mermaid.vue
Made mermaidConfig a local variable so that it cannot be shared cross rendering.
Fixed an issue that diagrams disappear from docs pages when switching themes or reloading pages
Fixed the issue that theme-switch does not work on docs.
Get base sha from PR
Run doc lint only if files changed
Run doc lint only if files changed
Run doc lint only if files changed
split lint docs action
split lint docs action
fix: File location
fix(docs): Test auto commit
fix(docs): Test auto commit
fix(docs): Test auto commit
chore: Update docs path
chore: Auto build docs if only src/docs is changed
* origin/develop: (564 commits)
chore: Format Mermaid.vue
Made mermaidConfig a local variable so that it cannot be shared cross rendering.
Fix for issue #3882 moving the label when the path has been modified
Small fix for issue #3881
Fixed an issue that diagrams disappear from docs pages when switching themes or reloading pages
Fixed the issue that theme-switch does not work on docs.
chore: Fix mindmap link
chore: Switch back from unpkg to jsdelivr
delete functions not used in diagrams/c4 code (dead code)
Minor change
feat: Add @include support to docs
feat: Add @include example to docs
feat: Add @include support to docs
cleanup
fix lines
fix Async rendering
Revert "sync"
chore(deps): update pnpm to v7.17.1
chore(deps): remove dependency on `graphlib`
test(e2e): make gitgraph snapshots consistent
...
Adds a custom error message for any mermaid diagram that starts with
a `---`. Normally, these are expected to be part of a YAML front-matter
block, but indentation issues or a missing closing `---` may cause
these to be not parsed correctly.
`graphlib` has recently been replaced with the ESM version of
graphlib bundled with
[`dagre-d3-es`](https://www.npmjs.com/package/dagre-d3-es), in commit
f687abb1 (chore: Use `graphlib` from `dagre-d3-es`, 2022-11-20)
This means we can safely remove it from our dependencies list.
Fixes: f687abb165795dfe959e87216bb111ebc7bc71cc
In order to parse the YAML front-matter in a Mermaid diagram, the
YAML seperators **MUST NOT** be indented, e.g.:
````markdown
```mermaid
---
title: This is fine.
---
```
```mermaid
---
title: This is not fine, because the `---` are indented.
---
```
````
However, this makes it very difficult to write nice Mermaid diagrams in
HTML code-blocks.
This commit uses [`ts-dedent`](https://www.npmjs.com/package/ts-dedent)
to automatically remove the indentation from Mermaid diagrams when
parsed from HTML. Mermaid diagrams from mermaidAPI.render() are **NOT**
dedented, as that API is called from JavaScript code, and therefore
users can easily `dedent` their own diagrams.