diff --git a/packages/mermaid/src/docs/.vitepress/config.ts b/packages/mermaid/src/docs/.vitepress/config.ts index db1fdfef0..a1e7b05f8 100644 --- a/packages/mermaid/src/docs/.vitepress/config.ts +++ b/packages/mermaid/src/docs/.vitepress/config.ts @@ -49,6 +49,9 @@ export default defineConfig({ sidebar: { '/': sidebarAll(), }, + outline: { + level: 'deep', + }, socialLinks: [ { icon: 'github', link: 'https://github.com/mermaid-js/mermaid' }, { @@ -198,7 +201,7 @@ function sidebarCommunity() { collapsed: false, items: [ { text: 'Contributing to Mermaid', link: '/contributing/intro' }, - { text: 'Quick start guide', link: '/contributing/quick-start' }, + { text: 'Contributing guide', link: '/contributing/contributing' }, { text: 'Initial setup', link: '/contributing/setup' }, { text: 'Workflow', link: '/contributing/workflow' }, { text: 'Code', link: '/contributing/code' }, diff --git a/packages/mermaid/src/docs/community/documentation.md b/packages/mermaid/src/docs/community/documentation.md index 2c33af410..cb5d03898 100644 --- a/packages/mermaid/src/docs/community/documentation.md +++ b/packages/mermaid/src/docs/community/documentation.md @@ -1,4 +1,5 @@ -# Contributing Documentation + +# Contributing to 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? @@ -6,7 +7,7 @@ The documentation is written in Markdown. It is located in the [`packages/mermai 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. -## How to Contribute to Documentation +## How to Contribute ```warning DO NOT CHANGE FILES IN `/docs` @@ -18,15 +19,21 @@ The `docs` folder will be automatically generated when committing to `packages/m flowchart LR classDef default fill:#fff,color:black,stroke:black - source["files in /packages/mermaid/src/docs\n(changes should be done here)"] -- automatic processing\nto generate the final documentation--> published["files in /docs\ndisplayed on the official documentation site"] + source["Edit /packages/mermaid/src/docs"] -- automatic processing--> published["View /docs which will be publised on Official Website"] ``` -It is OK to commit directly in the `develop` branch if you are a collaborator. +## Runing the Documentation Website -```tip -If the change is **only** to the documentation, you can get your changes published to the site quicker by making a PR to the `master` branch. In that case, your branch should be based on master, not develop. -``` +**[The mermaid documentation site](https://mermaid.js.org/) is powered by [Vitepress](https://vitepress.vuejs.org/).** + +To run the documentation site locally: + +1. Run `pnpm --filter mermaid run docs:dev` to start the dev server. (Or `pnpm docs:dev` inside the `packages/mermaid` directory.) +2. Open [http://localhost:3333/](http://localhost:3333/) in your browser. + + +### Markdown extensions You can use `note`, `tip`, `warning` and `danger` in triple backticks to add a note, tip, warning or danger box. Do not use vitepress specific markdown syntax `::: warning` as it will not be processed correctly. @@ -49,14 +56,6 @@ Danger content ``` ```` -## The official documentation site - -**[The mermaid documentation site](https://mermaid.js.org/) is powered by [Vitepress](https://vitepress.vuejs.org/).** - -To run the documentation site locally: - -1. Run `pnpm --filter mermaid run docs:dev` to start the dev server. (Or `pnpm docs:dev` inside the `packages/mermaid` directory.) -2. Open [http://localhost:3333/](http://localhost:3333/) in your browser. Markdown is used to format the text, for more information about Markdown [see the GitHub Markdown help page](https://help.github.com/en/github/writing-on-github/basic-writing-and-formatting-syntax). diff --git a/packages/mermaid/src/docs/community/intro.md b/packages/mermaid/src/docs/community/intro.md index 3d618d153..91a58393f 100644 --- a/packages/mermaid/src/docs/community/intro.md +++ b/packages/mermaid/src/docs/community/intro.md @@ -10,7 +10,7 @@ Here are a few things to get you started on the right path. ```mermaid-nocode mindmap - root)Contribution( + root)Contributing( Development Solving issues Adding new diagrams @@ -25,23 +25,23 @@ mindmap Classification and monitoring of incoming issues ``` -## Join the development - -[Join our slack community if you want closer contact!](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE) - -## Help with testing - -## Manage tasks + + + ## Where do I start? +```tip +Detailed information about contributing can be found in the [contribution guide](../contributing/contributing.md). +``` + - You could confirm the bugs in [these issues](https://github.com/knsv/mermaid/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22Type%3A+Bug+%2F+Error%22+label%3A%22Status%3A+Pending%22). - You could help write and improve the documentation! [Here's ](https://github.com/knsv/mermaid/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22Help+wanted%21%22+label%3A%22Area%3A+Documentation%22)some inspiration. - You could start getting some knowledge of the code base by working on [these "good first issues"](https://github.com/knsv/mermaid/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22Good+first+issue%21%22+). - You could jump right in and help us fix any of [these bugs](https://github.com/knsv/mermaid/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22Type%3A+Bug+%2F+Error%22+label%3A%22Help+wanted%21%22+label%3A%22Area%3A+Development%22)! - You could work on a new feature! [These](https://github.com/knsv/mermaid/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22Area%3A+Development%22+label%3A%22Help+wanted%21%22+label%3A%22Type%3A+Enhancement%22+label%3A%22Status%3A+Approved%22) are some ideas! +- [Join our slack community if you want closer contact!](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE) -Detailed information about contributing can be found in the [contribution guide](https://github.com/mermaid-js/mermaid/blob/master/CONTRIBUTING.md). ## Last Words diff --git a/packages/mermaid/src/docs/community/quick-start.md b/packages/mermaid/src/docs/community/quick-start.md deleted file mode 100644 index 84ae492ea..000000000 --- a/packages/mermaid/src/docs/community/quick-start.md +++ /dev/null @@ -1 +0,0 @@ -quick start contributing guide \ No newline at end of file diff --git a/packages/mermaid/src/docs/community/setup.md b/packages/mermaid/src/docs/community/setup.md index ac087ad9e..7574081f3 100644 --- a/packages/mermaid/src/docs/community/setup.md +++ b/packages/mermaid/src/docs/community/setup.md @@ -16,8 +16,6 @@ flowchart LR ``` -Here are a few things to get you started on the right path. - ## Get the Source Code In GitHub, you first **fork** a repository when you are going to make changes and submit pull requests. @@ -41,7 +39,7 @@ These are the tools we use for working with the code and documentation: - [pnpm](https://pnpm.io/) package manager. `volta install pnpm` - [npx](https://docs.npmjs.com/cli/v8/commands/npx) the packaged executor in npm. This is needed [to install pnpm.](#install-packages) -Follow the setup steps below to install them and start the development. +Follow the setup steps below to start the development. ## Setup and Launch @@ -61,7 +59,7 @@ Run `npx pnpm install`. You will need `npx` for this because volta doesn't suppo npx pnpm install # npx is required for first install ``` -### Launch +### Launch Mermaid ```bash npx pnpm run dev @@ -77,6 +75,10 @@ If you need a specific diagram, you can duplicate the `example.html` file in `/d That will be served at . After making code changes, the dev server will rebuild the mermaid library. You will need to reload the browser page yourself to see the changes. (PRs for auto reload are welcome!) +### Launch Documentaion Website + + + ## Verify Everything is Working This step is optional, but it helps to make sure that everything in development branch was OK before you started making any changes. diff --git a/packages/mermaid/src/docs/ecosystem/integrations-community.md b/packages/mermaid/src/docs/ecosystem/integrations-community.md index 1e85102ce..f18591376 100644 --- a/packages/mermaid/src/docs/ecosystem/integrations-community.md +++ b/packages/mermaid/src/docs/ecosystem/integrations-community.md @@ -1,7 +1,3 @@ ---- -outline: 'deep' # shows all h3 headings in outline in Vitepress ---- - # Integrations ## Official integration: [Mermaid Chart](./mermaid-chart.md) diff --git a/packages/mermaid/src/docs/ecosystem/integrations-create.md b/packages/mermaid/src/docs/ecosystem/integrations-create.md index 421240729..b848a90aa 100644 --- a/packages/mermaid/src/docs/ecosystem/integrations-create.md +++ b/packages/mermaid/src/docs/ecosystem/integrations-create.md @@ -1,7 +1,3 @@ ---- -outline: 'deep' # shows all h3 headings in outline in Vitepress ---- - # Integrations - create ## Recommendations diff --git a/packages/mermaid/src/docs/ecosystem/mermaid-chart.md b/packages/mermaid/src/docs/ecosystem/mermaid-chart.md index 7d0e90024..f7f306b94 100644 --- a/packages/mermaid/src/docs/ecosystem/mermaid-chart.md +++ b/packages/mermaid/src/docs/ecosystem/mermaid-chart.md @@ -1,7 +1,3 @@ ---- -outline: 'deep' # shows all h3 headings in outline in Vitepress ---- - # Mermaid Chart
diff --git a/packages/mermaid/src/docs/syntax/flowchart.md b/packages/mermaid/src/docs/syntax/flowchart.md index 23306acdd..1f4bcbc4b 100644 --- a/packages/mermaid/src/docs/syntax/flowchart.md +++ b/packages/mermaid/src/docs/syntax/flowchart.md @@ -1,6 +1,5 @@ --- title: Flowcharts Syntax -outline: 'deep' # shows all h3 headings in outline in Vitepress --- # Flowcharts - Basic Syntax