mermaid/docs/community/documentation.md

100 lines
2.9 KiB
Markdown
Raw Normal View History

> **Warning**
>
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
>
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/community/documentation.md](../../packages/mermaid/src/docs/community/documentation.md).
# Contributing Documentation
If it is not in the documentation, it's like it never happened. Wouldn't that be sad? With all the effort that was put into the feature?
2023-12-18 23:58:33 +00:00
## Where is the Documentation Located?
2023-12-18 23:58:33 +00:00
> **Warning**
> DO NOT CHANGE FILES IN `/docs`
>
> The `docs` folder will be automatically generated when committing to `packages/mermaid/src/docs` and **should not** be edited manually.
2023-12-19 01:36:43 +00:00
Documentation is located in the [`packages/mermaid/src/docs`](https://github.com/mermaid-js/mermaid/tree/develop/packages/mermaid/src/docs) folder. Just pick the right section and start typing.
2023-12-18 23:58:33 +00:00
The contents of [mermaid.js.org](https://mermaid.js.org/) are based on the docs from the `master` branch. Updates committed to the `master` branch are reflected in the [Mermaid Docs](https://mermaid.js.org/) once published.
```mermaid-example
flowchart LR
classDef default fill:#fff,color:black,stroke:black
2023-12-18 23:58:33 +00:00
source["Edit /packages/mermaid/src/docs"] -- automatic processing--> published["View /docs which will be publised on Official Website"]
```
```mermaid
flowchart LR
classDef default fill:#fff,color:black,stroke:black
2023-12-18 23:58:33 +00:00
source["Edit /packages/mermaid/src/docs"] -- automatic processing--> published["View /docs which will be publised on Official Website"]
```
2023-12-19 00:59:26 +00:00
## Enable Github Actions
> **Warning**
> So as to allow automatic compilation of documentation pages you have to enable github actions on your fork first
2023-12-18 23:58:33 +00:00
## Running the Documentation Website Locally
2023-12-18 23:58:33 +00:00
**[The mermaid documentation site](https://mermaid.js.org/) is powered by [Vitepress](https://vitepress.vuejs.org/).**
Start development server for the documentation site
**Host**
```bash
pnpm --filter mermaid run docs:dev
```
2023-12-18 23:58:33 +00:00
or
2023-12-19 00:59:26 +00:00
```bash
cd packages/mermaid
pnpm docs:dev
```
2023-12-18 23:58:33 +00:00
**Docker**
2023-12-21 00:44:22 +00:00
```bash
./run docs:dev
```
2023-12-18 23:58:33 +00:00
Open <http://localhost:3333/> in your browser.
## Format
2023-12-19 00:59:26 +00:00
The documentation is written in Markdown. To get acquainted with its syntax [see the GitHub Markdown help page](https://help.github.com/en/github/writing-on-github/basic-writing-and-formatting-syntax).
2023-12-18 23:58:33 +00:00
You can use `note`, `tip`, `warning` and `danger` in triple backticks to add a note, tip, warning or danger box.
2023-12-19 00:59:26 +00:00
> **‼️ Danger**
> Do not use vitepress specific markdown syntax `::: warning` as it will not be processed correctly.
````markdown
```note
2023-12-19 00:59:26 +00:00
This is a note
```
```tip
2023-12-19 00:59:26 +00:00
This is a tip
```
```warning
2023-12-19 00:59:26 +00:00
This is a warning
```
```danger
2023-12-19 00:59:26 +00:00
This is a danger alert
```
````
2023-12-19 01:36:43 +00:00
## Navigation
If you want to propose changes to how the documentation is _organized_, such as adding a new section or re-arranging or renaming a section, you must update the **sidebar navigation.**
The sidebar navigation is defined in [the vitepress configuration file config.ts](../.vitepress/config.ts).