Skip to content

Commit

Permalink
Merge pull request #3401 from mermaid-js/sidv/docs
Browse files Browse the repository at this point in the history
Auto transform `mermaid-example` in docs.
  • Loading branch information
knsv authored Sep 5, 2022
2 parents d52c1f0 + 5ae1bd9 commit 579dbc8
Show file tree
Hide file tree
Showing 132 changed files with 18,126 additions and 1,113 deletions.
4 changes: 4 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
"jsdoc/multiline-blocks": "off",
"jsdoc/newline-after-description": "off",
"jsdoc/tag-lines": "off",
"jsdoc/require-param-description": "off",
"jsdoc/require-param-type": "off",
"jsdoc/require-returns": "off",
"jsdoc/require-returns-description": "off",
"cypress/no-async-tests": "off",
"json/*": ["error", "allowComments"],
"no-empty": ["error", { "allowEmptyCatch": true }]
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ jobs:

- name: Run Linting
run: yarn lint

- name: Verify Docs
run: yarn docs:verify
1 change: 1 addition & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"src/docs/**": ["yarn docs:build --git"],
"*.{ts,js,json,html,md}": ["eslint --fix", "prettier --write"]
}
6 changes: 4 additions & 2 deletions docs/8.6.0_docs.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs.

# Version 8.6.0 Changes

## [New Mermaid Live-Editor Beta](https://mermaid-js.github.io/docs/mermaid-live-editor-beta/#/edit/eyJjb2RlIjoiJSV7aW5pdDoge1widGhlbWVcIjogXCJmb3Jlc3RcIiwgXCJsb2dMZXZlbFwiOiAxIH19JSVcbmdyYXBoIFREXG4gIEFbQ2hyaXN0bWFzXSAtLT58R2V0IG1vbmV5fCBCKEdvIHNob3BwaW5nKVxuICBCIC0tPiBDe0xldCBtZSB0aGlua31cbiAgQyAtLT58T25lfCBEW0xhcHRvcF1cbiAgQyAtLT58VHdvfCBFW2lQaG9uZV1cbiAgQyAtLT58VGhyZWV8IEZbZmE6ZmEtY2FyIENhcl1cblx0XHQiLCJtZXJtYWlkIjp7InRoZW1lIjoiZGFyayJ9fQ)
Expand Down Expand Up @@ -36,9 +38,9 @@ The modifiable parts of the Configuration are limited by the secure array, which
# Secure Arrays

Site owners can add to the **secure** array using this command:
mermaidAPI.initialize( { startOnLoad: true, secure: ['parameter1', 'parameter2'] } );
mermaidAPI.initialize( { startOnLoad: true, secure: \['parameter1', 'parameter2'] } );

Default values for the `secure array` consists of: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize']. These default values are immutable.
Default values for the `secure array` consists of: \['secure', 'securityLevel', 'startOnLoad', 'maxTextSize']. These default values are immutable.

Implementors can only modify configurations using directives, and cannot change the `secure` array.

Expand Down
1,070 changes: 536 additions & 534 deletions docs/CHANGELOG.md

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion docs/Configuration.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs.

# Configuration

Configuration is the second half of Mermaid, after deployment. Together Deployment and Configuration constitute the whole of Mermaid.
Expand All @@ -11,7 +13,7 @@ The Following are the most commonly used methods, and are all tied to Mermaid [D

## [Directives](./directives.md),

allows the limited reconfiguration of a diagram just before it is rendered. It can alter the font style, color and other aesthetic aspects of the diagram. you can pass a directive alongside your definition inside `%%{ }%%`, either above or below your diagram definition.
Directives allows limited reconfiguration of a diagram just before it is rendered. It can alter the font style, color and other aesthetic aspects of the diagram. You can pass a directive alongside your definition inside `%%{ }%%`, either above or below your diagram definition.

## Theme Creation:

Expand Down
36 changes: 23 additions & 13 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs.

# About Mermaid

**Mermaid lets you create diagrams and visualizations using text and code.**
Expand All @@ -8,8 +10,6 @@ It is a JavaScript based diagramming and charting tool that renders Markdown-ins
<img src="img/header.png" alt="" />

<!-- **Edit this Page** [![N|Solid](img/GitHub-Mark-32px.png)](https://github.com/mermaid-js/mermaid/blob/develop/docs/README.md) -->

[![Build Status](https://travis-ci.org/mermaid-js/mermaid.svg?branch=master)](https://travis-ci.org/mermaid-js/mermaid) [![NPM](https://img.shields.io/npm/v/mermaid)](https://www.npmjs.com/package/mermaid) [![Coverage Status](https://coveralls.io/repos/github/mermaid-js/mermaid/badge.svg?branch=master)](https://coveralls.io/github/mermaid-js/mermaid?branch=master) [![Join our Slack!](https://img.shields.io/static/v1?message=join%20chat&color=9cf&logo=slack&label=slack)](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE)

<!-- Mermaid book banner -->
Expand All @@ -24,8 +24,7 @@ Mermaid is a JavaScript based diagramming and charting tool that uses Markdown-i
Diagramming and documentation costs precious developer time and gets outdated quickly.
But not having diagrams or docs ruins productivity and hurts organizational learning.<br/>
Mermaid addresses this problem by enabling users to create easily modifiable diagrams, it can also be made part of production scripts (and other pieces of code).<br/>
<br/>
Mermaid addresses this problem by enabling users to create easily modifiable diagrams, it can also be made part of production scripts (and other pieces of code).<br/> <br/>
Mermaid allows even non-programmers to easily create detailed and diagrams through the [Mermaid Live Editor](https://mermaid.live/).<br/>
[Tutorials](./Tutorials.md) has video tutorials.
Use Mermaid with your favorite applications, check out the list of [Integrations and Usages of Mermaid](./integrations.md).
Expand Down Expand Up @@ -131,6 +130,19 @@ Class08 <--> C2: Cool label
commit
```

```mermaid
gitGraph
commit
commit
branch develop
commit
commit
commit
checkout main
commit
commit
```

### [Entity Relationship Diagram - :exclamation: experimental](./entityRelationshipDiagram.md)

```mmd
Expand Down Expand Up @@ -167,25 +179,23 @@ journey

### CDN

```
https://unpkg.com/mermaid@<version>/dist/
```
https://unpkg.com/mermaid@<version>/dist/

To select a version:

Replace `<version>` with the desired version number.

Latest Version: [https://unpkg.com/browse/mermaid@8.8.0/](https://unpkg.com/browse/mermaid@8.8.0/)
Latest Version: <https://unpkg.com/browse/mermaid@8.8.0/>

## Deploying Mermaid

To Deploy Mermaid:

1. You will need to install node v16, which would have npm
2. Download yarn using npm
3. Enter the following command: `yarn add mermaid`
4. You can then add mermaid as a dev dependency using this command:
`yarn add --dev mermaid`
1. You will need to install node v16, which would have npm
2. Download yarn using npm
3. Enter the following command: `yarn add mermaid`
4. You can then add mermaid as a dev dependency using this command:
`yarn add --dev mermaid`

### [Mermaid API](./Setup.md):

Expand Down
2 changes: 2 additions & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs.

# Summary

- [mermaid](README.md)
Expand Down
10 changes: 6 additions & 4 deletions docs/Setup.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs.

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## mermaidAPI
Expand Down Expand Up @@ -58,9 +60,9 @@ Theme , the CSS style sheet

## logLevel

| Parameter | Description | Type | Required | Values |
| --------- | ----------------------------------------------------- | ---------------- | -------- | --------------------------------------------- |
| logLevel | This option decides the amount of logging to be used. | string \| number | Required | 'trace','debug','info','warn','error','fatal' |
| Parameter | Description | Type | Required | Values |
| --------- | ----------------------------------------------------- | ------ | -------- | -------- | --------------------------------------------- |
| logLevel | This option decides the amount of logging to be used. | string | number | Required | 'trace','debug','info','warn','error','fatal' |

**Notes:**

Expand Down Expand Up @@ -116,7 +118,7 @@ overriding a site's default security.

**Notes**:

Default value: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize']
Default value: \['secure', 'securityLevel', 'startOnLoad', 'maxTextSize']

## deterministicIds

Expand Down
2 changes: 2 additions & 0 deletions docs/Tutorials.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs.

# Tutorials

This is list of publicly available Tutorials for using Mermaid.JS . This is intended as a basic introduction for the use of the Live Editor for generating diagrams, and deploying Mermaid.JS through HTML.
Expand Down
2 changes: 2 additions & 0 deletions docs/_navbar.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs.

- Getting started

- [Quick start](quickstart.md)
Expand Down
2 changes: 2 additions & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs.

- 📔 Introduction

- [About Mermaid](README.md)
Expand Down
Loading

0 comments on commit 579dbc8

Please sign in to comment.