Use deep outline for the whole documentation website

This commit is contained in:
Nikolay Rozhkov
2023-12-19 00:54:33 +03:00
parent 0506ba872a
commit f66f4f438f
9 changed files with 33 additions and 43 deletions

View File

@@ -49,6 +49,9 @@ export default defineConfig({
sidebar: { sidebar: {
'/': sidebarAll(), '/': sidebarAll(),
}, },
outline: {
level: 'deep',
},
socialLinks: [ socialLinks: [
{ icon: 'github', link: 'https://github.com/mermaid-js/mermaid' }, { icon: 'github', link: 'https://github.com/mermaid-js/mermaid' },
{ {
@@ -198,7 +201,7 @@ function sidebarCommunity() {
collapsed: false, collapsed: false,
items: [ items: [
{ text: 'Contributing to Mermaid', link: '/contributing/intro' }, { 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: 'Initial setup', link: '/contributing/setup' },
{ text: 'Workflow', link: '/contributing/workflow' }, { text: 'Workflow', link: '/contributing/workflow' },
{ text: 'Code', link: '/contributing/code' }, { text: 'Code', link: '/contributing/code' },

View File

@@ -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? 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. 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 ```warning
DO NOT CHANGE FILES IN `/docs` DO NOT CHANGE FILES IN `/docs`
@@ -18,15 +19,21 @@ The `docs` folder will be automatically generated when committing to `packages/m
flowchart LR flowchart LR
classDef default fill:#fff,color:black,stroke:black 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 **[The mermaid documentation site](https://mermaid.js.org/) is powered by [Vitepress](https://vitepress.vuejs.org/).**
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.
``` 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. 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. 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). 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).

View File

@@ -10,7 +10,7 @@ Here are a few things to get you started on the right path.
```mermaid-nocode ```mermaid-nocode
mindmap mindmap
root)Contribution( root)Contributing(
Development Development
Solving issues Solving issues
Adding new diagrams Adding new diagrams
@@ -25,23 +25,23 @@ mindmap
Classification and monitoring of incoming issues Classification and monitoring of incoming issues
``` ```
## Join the development <!-- ## Join the development -->
<!-- ## Help with testing -->
[Join our slack community if you want closer contact!](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE) <!-- ## Manage tasks -->
## Help with testing
## Manage tasks
## Where do I start? ## 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 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 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 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 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! - 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 ## Last Words

View File

@@ -1 +0,0 @@
quick start contributing guide

View File

@@ -16,8 +16,6 @@ flowchart LR
``` ```
Here are a few things to get you started on the right path.
## Get the Source Code ## Get the Source Code
In GitHub, you first **fork** a repository when you are going to make changes and submit pull requests. 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` - [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) - [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 ## 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 npx pnpm install # npx is required for first install
``` ```
### Launch ### Launch Mermaid
```bash ```bash
npx pnpm run dev 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 <http://localhost:9000/dev/your-file-name.html>. That will be served at <http://localhost:9000/dev/your-file-name.html>.
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!) 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 ## 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. This step is optional, but it helps to make sure that everything in development branch was OK before you started making any changes.

View File

@@ -1,7 +1,3 @@
---
outline: 'deep' # shows all h3 headings in outline in Vitepress
---
# Integrations # Integrations
## Official integration: [Mermaid Chart](./mermaid-chart.md) ## Official integration: [Mermaid Chart](./mermaid-chart.md)

View File

@@ -1,7 +1,3 @@
---
outline: 'deep' # shows all h3 headings in outline in Vitepress
---
# Integrations - create # Integrations - create
## Recommendations ## Recommendations

View File

@@ -1,7 +1,3 @@
---
outline: 'deep' # shows all h3 headings in outline in Vitepress
---
# Mermaid Chart # Mermaid Chart
<br /> <br />

View File

@@ -1,6 +1,5 @@
--- ---
title: Flowcharts Syntax title: Flowcharts Syntax
outline: 'deep' # shows all h3 headings in outline in Vitepress
--- ---
# Flowcharts - Basic Syntax # Flowcharts - Basic Syntax