Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved New Documentation #3678

Merged
merged 54 commits into from
Nov 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
cbcf7f8
docs: new Documentation
emersonbottero Oct 15, 2022
0da56a1
docs: new Documentation
emersonbottero Oct 15, 2022
c8b377b
docs: small improvements
emersonbottero Oct 17, 2022
c45bf05
docs: added warning and notes
emersonbottero Oct 18, 2022
d296049
docs: added warning and notes
emersonbottero Oct 18, 2022
e95eadd
docs: added warning and notes
emersonbottero Oct 18, 2022
66ea491
docs: fix layout problem
emersonbottero Oct 18, 2022
f2571e9
fix: Live editor links
sidharthv96 Oct 18, 2022
017fc48
Merge branch 'develop' of https://github.com/emersonbottero/mermaid i…
sidharthv96 Oct 18, 2022
4cd1e9a
docs: contribute with vitepress
emersonbottero Oct 20, 2022
4b64775
docs: small fixes
emersonbottero Oct 20, 2022
870cfdc
docs: transform custom blocks, warning notes jison
emersonbottero Oct 20, 2022
563aff2
fix: gh pages workflow
emersonbottero Oct 21, 2022
b62873a
sync last changes
emersonbottero Oct 25, 2022
47e1f61
fix: lint and spell errors
emersonbottero Oct 26, 2022
455839c
fix: Merge conflicts
emersonbottero Oct 26, 2022
289ac52
fix : CQ
emersonbottero Oct 26, 2022
ec5568b
chore: more revision fixes
emersonbottero Oct 27, 2022
6b3892b
Merge remote-tracking branch 'origin/develop' into pr/emersonbottero/…
sidharthv96 Oct 28, 2022
d7bf92b
fix: Use AST to replace notes & warnings.
sidharthv96 Oct 28, 2022
b7d24c8
chore: Fix favicon
sidharthv96 Oct 28, 2022
13e5c5b
chore: Fix vitepress build
sidharthv96 Oct 28, 2022
b0b4ccc
fix: Team members
sidharthv96 Oct 28, 2022
61e20ce
chore: update cspell.json
sidharthv96 Oct 28, 2022
6e5adbf
Merge remote-tracking branch 'origin/develop' into pr/emersonbottero/…
sidharthv96 Oct 28, 2022
e1d9d0b
chore: Fix doc links
sidharthv96 Oct 28, 2022
f3cf6d6
chore: Add prettier to docs:code
sidharthv96 Oct 28, 2022
8f5fe38
chore: format blockquote
sidharthv96 Oct 28, 2022
fed3260
chore: Update docs build vitepress command
sidharthv96 Oct 28, 2022
f87d163
chore: fix most of aloisklink reviews
emersonbottero Oct 31, 2022
a7c9fe7
Update packages/mermaid/src/docs.mts
sidharthv96 Oct 31, 2022
3675682
Apply suggestions from code review
sidharthv96 Oct 31, 2022
01ac770
chore: Review comments
sidharthv96 Oct 31, 2022
85444db
Merge branch 'develop' of https://github.com/emersonbottero/mermaid i…
sidharthv96 Oct 31, 2022
d1e235a
chore: Ignore `packages/mermaid/src/docs/config/setup`
sidharthv96 Oct 31, 2022
450c308
Update packages/mermaid/.lintstagedrc.json
sidharthv96 Oct 31, 2022
24198ed
Merge remote-tracking branch 'origin/develop' into pr/emersonbottero/…
sidharthv96 Oct 31, 2022
359a570
Precommit Test
sidharthv96 Oct 31, 2022
d08701e
Precommit Test
sidharthv96 Oct 31, 2022
1e410de
Precommit Test
sidharthv96 Oct 31, 2022
3b7463e
Precommit Test
sidharthv96 Oct 31, 2022
c72bdc8
chore: Cleanup lintStaged
sidharthv96 Oct 31, 2022
f36e0ef
chore: Add actions deploy
sidharthv96 Oct 31, 2022
56c2fe3
Publish
sidharthv96 Oct 31, 2022
2c5a207
Fix lint
sidharthv96 Oct 31, 2022
78565d1
Add pnpm
sidharthv96 Oct 31, 2022
83fb0f4
Fix base
sidharthv96 Oct 31, 2022
b735c21
chore: Remove test branch
sidharthv96 Oct 31, 2022
a923478
chore: Configure typedoc source links
sidharthv96 Oct 31, 2022
61b7033
fix: Lint
sidharthv96 Oct 31, 2022
70ec91d
docs: Change yarn to pnpm
sidharthv96 Nov 1, 2022
4699ba3
Update contributors
sidharthv96 Nov 1, 2022
86f835c
Merge branch 'develop' into pr/emersonbottero/3678
sidharthv96 Nov 1, 2022
05fd856
chore: cSpell
sidharthv96 Nov 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/setup-node@v3
name: Setup node
with:
node-version: '16'
node-version: '18'
- run: npm install -g cspell
name: Install cSpell
- run: cspell --config ./cSpell.json "packages/mermaid/src/docs/**/*.md" --no-progress
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ jobs:
run: pnpm run lint

- name: Verify Docs
working-directory: ./packages/mermaid
run: pnpm run docs:verify
62 changes: 62 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Deploy Vitepress docs to Pages

on:
# Runs on pushes targeting the default branch
push:
branches:
- master

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: 'pages'
cancel-in-progress: true

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: pnpm/action-setup@v2

- name: Setup Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: 18

- name: Install Packages
run: pnpm install --frozen-lockfile

- name: Setup Pages
uses: actions/configure-pages@v2

- name: Run Build
run: pnpm --filter mermaid run docs:build:vitepress

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: packages/mermaid/src/vitepress/.vitepress/dist

# Deployment job
deploy:
environment:
name: github-pages
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
5 changes: 1 addition & 4 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"packages/mermaid/src/docs/**": ["pnpm run docs:build --git"],
"packages/mermaid/src/docs.mts": ["pnpm run docs:build --git"],
emersonbottero marked this conversation as resolved.
Show resolved Hide resolved
"*.{ts,js,json,html,md,mts}": ["eslint --fix", "prettier --write"],
"*.jison": ["pnpm run lint:jison"]
"!(docs/**/*)*.{ts,js,json,html,md,mts}": ["eslint --fix", "prettier --write"]
}
11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@
"args": ["run", "${relativeFile}"],
"smartStep": true,
"console": "integratedTerminal"
},
{
"name": "Docs generation",
"type": "node",
"request": "launch",
"args": ["src/docs.mts"],
"runtimeArgs": ["--loader", "ts-node/esm"],
"cwd": "${workspaceRoot}/packages/mermaid",
"skipFiles": ["<node_internals>/**", "**/node_modules/**"],
"smartStep": true,
"internalConsoleOptions": "openOnSessionStart"
}
]
}
27 changes: 9 additions & 18 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ We make all changes via pull requests. As we have many pull requests from develo

- Large changes reviewed by knsv or other developer asked to review by knsv
- Smaller low-risk changes like dependencies, documentation, etc. can be merged by active collaborators
- Documentation (updates to the `src/docs` folder is also allowed via direct commits)
- Documentation (updates to the `package/mermaid/src/docs` folder is also allowed via direct commits)

To commit code, create a branch, let it start with the type like feature or bug followed by the issue number for reference and some describing text.

Expand Down Expand Up @@ -67,31 +67,22 @@ flowchart LR

### The official documentation site

**[The mermaid documentation site](https://mermaid-js.github.io/mermaid/) is powered by [Docsify](https://docsify.js.org), a simple documentation site generator.**
**[The mermaid documentation site](https://mermaid-js.github.io/mermaid/) is powered by [Vitepress](https://vitepress.vuejs.org/), a simple documentation site generator.**

If you want to preview the whole documentation site on your machine, you need to install `docsify-cli`:
If you want to preview the whole documentation site on your machine:

```sh
$ npm i docsify-cli -g
```

If you are more familiar with Yarn, you can use the following command:

```sh
$ yarn global add docsify-cli
cd mermaid
pnpm i
pnpm docs:dev
```

The above command will install `docsify-cli` globally.
If the installation is successful, the command `docsify` will be available in your `PATH`.

You can now run the following command to serve the documentation site:
You can now build and serve the documentation site:

```sh
$ docsify serve docs
pnpm docs:serve
```

Once the local HTTP server is listening, you can point your browser at http://localhost:3000.

## Branching

Going forward we will use a git flow inspired approach to branching. So development is done in develop, to do the development in the develop.
Expand Down Expand Up @@ -152,7 +143,7 @@ The source files for documentation are in `/packages/mermaid/src/docs` and are w

#### Adding to or changing the documentation organization

If you want to add a new section or change the organization (structure), then you need to make sure to **change the side navigation** in `src/docs/_sidebar.md`.
If you want to add a new section or change the organization (structure), then you need to make sure to **change the side navigation** in `mermaid/src/docs/.vitepress/config.js`.

When changes are committed and then released, they become part of the `master` branch and become part of the published documentation on https://mermaid-js.github.io/mermaid/

Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,11 @@ To report a vulnerability, please e-mail security@mermaid.live with a descriptio

A quick note from Knut Sveidqvist:

> _Many thanks to the [d3](https://d3js.org/) and [dagre-d3](https://github.com/cpettitt/dagre-d3) projects for providing the graphical layout and drawing libraries!_ >_Thanks also to the [js-sequence-diagram](https://bramp.github.io/js-sequence-diagrams) project for usage of the grammar for the sequence diagrams. Thanks to Jessica Peter for inspiration and starting point for gantt rendering._ >_Thank you to [Tyler Long](https://github.com/tylerlong) who has been a collaborator since April 2017._
> _Many thanks to the [d3](https://d3js.org/) and [dagre-d3](https://github.com/cpettitt/dagre-d3) projects for providing the graphical layout and drawing libraries!_
>
> _Thanks also to the [js-sequence-diagram](https://bramp.github.io/js-sequence-diagrams) project for usage of the grammar for the sequence diagrams. Thanks to Jessica Peter for inspiration and starting point for gantt rendering._
>
> _Thank you to [Tyler Long](https://github.com/tylerlong) who has been a collaborator since April 2017._
>
> _Thank you to the ever-growing list of [contributors](https://github.com/knsv/mermaid/graphs/contributors) that brought the project this far!_

Expand Down
28 changes: 22 additions & 6 deletions cSpell.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,35 @@
"version": "0.2",
"language": "en",
"words": [
"blockquotes",
"customizability",
"Gantt",
"jison",
"knsv",
"Knut",
"mermiad",
"mindmap",
"Mindmaps",
"mitigations",
"sandboxed",
"Sveidqvist",
"shiki",
"verdana",
"Visio",
"mermiad"
"Visio"
],
"ignoreWords": [
"Alois",
"Klink",
"knsv",
"Knut",
"Matthieu",
"Sidharth",
"Sveidqvist",
"Vinod",
"Faber",
"Orlandoni",
"Klemm",
"Mindaugas",
"Laganeckas",
"Cuzon",
"Yash",
"Adamiecki",
"applitools",
"Asciidoctor",
Expand Down Expand Up @@ -63,7 +77,9 @@
"Kaufmann",
"viewports",
"edgechromium",
"statediagram"
"statediagram",
"Brolin",
"Greywolf"
],
"patterns": [
{
Expand Down
10 changes: 7 additions & 3 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/CHANGELOG.md](../packages/mermaid/src/docs/CHANGELOG.md).
> **Warning**
>
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
>
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/CHANGELOG.md](../packages/mermaid/src/docs/CHANGELOG.md).

# Change Log

Expand All @@ -13,10 +17,10 @@ All changes are in descending order, beginning with the newest (latest) version.
🔖 [Release Notes](https://github.com/mermaid-js/mermaid/releases/tag/8.7.0) |
📜 [Full Changelog](https://github.com/mermaid-js/mermaid/compare/8.6.0...8.7.0)

This version brings with it a system for [dynamic and integrated configuration of the diagram themes](./theming.md).
This version brings with it a system for [dynamic and integrated configuration of the diagram themes](config/theming.md).
The objective of this is to increase the customizability of mermaid and the ease of Styling, with the customization of themes through the `%%init%%` directive and `initialize` calls.

Themes follow and build upon the Levels of Configuration and employ `directives` to modify and create custom configurations, as they were introduced in Version [8.6.0](../getting-started/8.6.0_docs.md).
Themes follow and build upon the Levels of Configuration and employ `directives` to modify and create custom configurations, as they were introduced in Version [8.6.0](config/8.6.0_docs.md).

**These Theming Configurations, similar to directives, will also be made applicable in the Live-Editor, for easier styling.**

Expand Down
22 changes: 0 additions & 22 deletions docs/Configuration.md

This file was deleted.

17 changes: 0 additions & 17 deletions docs/SUMMARY.md

This file was deleted.

Loading