diff --git a/docs/.nojekyll b/docs/.nojekyll
new file mode 100644
index 000000000..e69de29bb
diff --git a/docs/README.md b/docs/README.md
new file mode 100644
index 000000000..6f99dd3f7
--- /dev/null
+++ b/docs/README.md
@@ -0,0 +1,210 @@
+[](https://travis-ci.org/knsv/mermaid)
+[](https://coveralls.io/github/knsv/mermaid?branch=master)
+[](https://gitter.im/knsv/mermaid?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+
+# mermaid
+
+**🖖 Keep a steady pulse: mermaid needs more Collaborators [#866](https://github.com/knsv/mermaid/issues/866)**
+
+
+
+Generation of diagrams and flowcharts from text in a similar manner as markdown.
+
+Ever wanted to simplify documentation and avoid heavy tools like Visio when explaining your code?
+
+This is why mermaid was born, a simple markdown-like script language for generating charts from text via javascript.
+
+**Mermaid was nomiated and won the JS Open Source Awards (2019) in the catory The most existing use of technology!!! Thanks to all involved, people committing pull requests, people answering questions and special thanks to Tyler Long who is helping me maintain the project.**
+
+### Flowchart
+
+```
+graph TD;
+ A-->B;
+ A-->C;
+ B-->D;
+ C-->D;
+```
+
+
+
+### Sequence diagram
+
+```
+sequenceDiagram
+ participant Alice
+ participant Bob
+ Alice->>John: Hello John, how are you?
+ loop Healthcheck
+ John->>John: Fight against hypochondria
+ end
+ Note right of John: Rational thoughts prevail!
+ John-->>Alice: Great!
+ John->>Bob: How about you?
+ Bob-->>John: Jolly good!
+```
+
+
+
+### Gantt diagram
+
+```
+gantt
+dateFormat YYYY-MM-DD
+title Adding GANTT diagram to mermaid
+excludes weekdays 2014-01-10
+
+section A section
+Completed task :done, des1, 2014-01-06,2014-01-08
+Active task :active, des2, 2014-01-09, 3d
+Future task : des3, after des2, 5d
+Future task2 : des4, after des3, 5d
+```
+
+
+
+### Class diagram - :exclamation: experimental
+
+```
+classDiagram
+Class01 <|-- AveryLongClass : Cool
+Class03 *-- Class04
+Class05 o-- Class06
+Class07 .. Class08
+Class09 --> C2 : Where am i?
+Class09 --* C3
+Class09 --|> Class07
+Class07 : equals()
+Class07 : Object[] elementData
+Class01 : size()
+Class01 : int chimp
+Class01 : int gorilla
+Class08 <--> C2: Cool label
+```
+
+
+
+### Git graph - :exclamation: experimental
+
+```
+gitGraph:
+options
+{
+ "nodeSpacing": 150,
+ "nodeRadius": 10
+}
+end
+commit
+branch newbranch
+checkout newbranch
+commit
+commit
+checkout master
+commit
+commit
+merge newbranch
+
+```
+
+
+
+
+## Installation
+
+### CDN
+
+```
+https://unpkg.com/mermaid@/dist/
+```
+
+Replace `` with expected version number.
+
+Example: https://unpkg.com/mermaid@7.1.0/dist/
+
+### Node.js
+
+```
+yarn add mermaid
+```
+
+
+## Documentation
+
+https://mermaidjs.github.io
+
+
+## Sibling projects
+
+- [mermaid CLI](https://github.com/mermaidjs/mermaid.cli)
+- [mermaid live editor](https://github.com/mermaidjs/mermaid-live-editor)
+- [mermaid webpack demo](https://github.com/mermaidjs/mermaid-webpack-demo)
+- [mermaid Parcel demo](https://github.com/mermaidjs/mermaid-parcel-demo)
+
+
+# Request for assistance
+
+Things are piling up and I have hard time keeping up. To remedy this
+it would be great if we could form a core team of developers to cooperate
+with the future development mermaid.
+
+As part of this team you would get write access to the repository and would
+represent the project when answering questions and issues.
+
+Together we could continue the work with things like:
+* adding more types of diagrams like mindmaps, ert diagrams etc
+* improving existing diagrams
+
+Don't hesitate to contact me if you want to get involved.
+
+
+# For contributors
+
+## Setup
+
+ yarn install
+
+
+## Build
+
+ yarn build:watch
+
+
+## Lint
+
+ yarn lint
+
+We use [JavaScript Standard Style](https://github.com/feross/standard).
+We recommend you installing [editor plugins](https://github.com/feross/standard#are-there-text-editor-plugins) so you can get real time lint result.
+
+
+## Test
+
+ yarn test
+
+Manual test in browser:
+
+ open dist/index.html
+
+
+## Release
+
+For those who have the permission to do so:
+
+Update version number in `package.json`.
+
+ npm publish
+
+Command above generates files into the `dist` folder and publishes them to npmjs.org.
+
+
+# Credits
+
+Many thanks to the [d3](http://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](http://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.
+
+*Mermaid was created by Knut Sveidqvist for easier documentation.*
+
+*[Tyler Long](https://github.com/tylerlong) has became a collaborator since April 2017.*
+
+Here is the full list of the projects [contributors](https://github.com/knsv/mermaid/graphs/contributors).
diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md
new file mode 100644
index 000000000..e4be903f9
--- /dev/null
+++ b/docs/SUMMARY.md
@@ -0,0 +1,15 @@
+# Summary
+
+- [mermaid](README.md)
+- [FAQ](faq.md)
+- [Breaking changes](breakingChanges.md)
+- [Usage](usage.md)
+- [Flowchart](flowchart.md)
+- [Sequence diagram](sequenceDiagram.md)
+- [Gantt diagram](gantt.md)
+- [mermaid CLI](mermaidCLI.md)
+- [Demos](demos.md)
+- [mermaidAPI](mermaidAPI.md)
+- [Development](development.md)
+- [Upgrading](upgrading.md)
+- [Contribute to this website](https://github.com/mermaidjs/mermaid-gitbook)
diff --git a/docs/_navbar.md b/docs/_navbar.md
new file mode 100644
index 000000000..7156cccdb
--- /dev/null
+++ b/docs/_navbar.md
@@ -0,0 +1,13 @@
+* Getting started
+
+ * [Quick start](quickstart.md)
+ * [Writing more pages](more-pages.md)
+ * [Custom navbar](custom-navbar.md)
+ * [Cover page](cover.md)
+
+* Configuration
+ * [Configuration](configuration.md)
+ * [Themes](themes.md)
+ * [Using plugins](plugins.md)
+ * [Markdown configuration](markdown.md)
+ * [Language highlight](language-highlight.md)
\ No newline at end of file
diff --git a/docs/_sidebar.md b/docs/_sidebar.md
new file mode 100644
index 000000000..3bce972ff
--- /dev/null
+++ b/docs/_sidebar.md
@@ -0,0 +1,26 @@
+- Getting started
+
+ - [mermaid](README.md)
+ - [FAQ](faq.md)
+ - [Usage](usage.md)
+ - [Demos](demos.md)
+ - [mermaid CLI](mermaidCLI.md)
+
+- Diagrams
+
+ - [Flowchart](flowchart.md)
+ - [Sequence diagram](sequenceDiagram.md)
+ - [Gantt](gantt.md)
+
+- Guide
+
+ - [Development](development.md)
+ - [mermaidAPI](mermaidAPI.md)
+ - [Vue compatibility](vue.md)
+ - [CDN](cdn.md)
+ - [Offline Mode(PWA)](pwa.md)
+ - [Server-Side Rendering(SSR)](ssr.md)
+ - [Embed Files](embed-files.md)
+
+- [Awesome docsify](awesome.md)
+- [Changelog](changelog.md)
\ No newline at end of file
diff --git a/docs/breakingChanges.md b/docs/breakingChanges.md
new file mode 100644
index 000000000..21206dc6d
--- /dev/null
+++ b/docs/breakingChanges.md
@@ -0,0 +1,51 @@
+# Breaking changes
+
+### Breaking changes from history version to latest version:
+
+## #1
+
+```javascript
+mermaid.initialize({
+ sequenceDiagram:{
+ ...
+ }
+})
+```
+
+has been changed to
+
+```javascript
+mermaid.initialize({
+ sequence:{
+ ...
+ }
+})
+```
+
+## #2
+
+In old versions you need to add CSS file to your HTML:
+
+```html
+
+```
+
+or
+
+```html
+
+```
+
+Now it is not needed to do so. And there are no more CSS files in distrubtion files.
+
+You just
+
+```javascript
+mermaid.initialize({
+ theme: 'forest'
+})
+```
+
+and it works like a charm.
+
+This is because now the CSS is inline with SVG for portability.
diff --git a/docs/demos.md b/docs/demos.md
new file mode 100644
index 000000000..a915c876d
--- /dev/null
+++ b/docs/demos.md
@@ -0,0 +1,90 @@
+# Demos
+
+
+## Basic sequence diagram
+
+```mermaid
+sequenceDiagram
+ Alice ->> Bob: Hello Bob, how are you?
+ Bob-->>John: How about you John?
+ Bob--x Alice: I am good thanks!
+ Bob-x John: I am good thanks!
+ Note right of John: Bob thinks a long long time, so long that the text does not fit on a row.
+
+ Bob-->Alice: Checking with John...
+ Alice->John: Yes... John, how are you?
+```
+
+
+## Basic flowchart
+
+```mermaid
+graph LR
+ A[Square Rect] -- Link text --> B((Circle))
+ A --> C(Round Rect)
+ B --> D{Rhombus}
+ C --> D
+```
+
+
+## Larger flowchart with some styling
+
+```mermaid
+graph TB
+ sq[Square shape] --> ci((Circle shape))
+
+ subgraph A subgraph
+ od>Odd shape]-- Two line edge comment --> ro
+ di{Diamond with line break} -.-> ro(Rounded square shape)
+ di==>ro2(Rounded square shape)
+ end
+
+ %% Notice that no text in shape are added here instead that is appended further down
+ e --> od3>Really long text with linebreak in an Odd shape]
+
+ %% Comments after double percent signs
+ e((Inner / circle and some odd special characters)) --> f(,.?!+-*ز)
+
+ cyr[Cyrillic]-->cyr2((Circle shape Начало));
+
+ classDef green fill:#9f6,stroke:#333,stroke-width:2px;
+ classDef orange fill:#f96,stroke:#333,stroke-width:4px;
+ class sq,e green
+ class di orange
+```
+
+
+## Loops, alt and opt
+
+```mermaid
+sequenceDiagram
+ loop Daily query
+ Alice->>Bob: Hello Bob, how are you?
+ alt is sick
+ Bob->>Alice: Not so good :(
+ else is well
+ Bob->>Alice: Feeling fresh like a daisy
+ end
+
+ opt Extra response
+ Bob->>Alice: Thanks for asking
+ end
+ end
+```
+
+
+## Message to self in loop
+
+```mermaid
+sequenceDiagram
+ participant Alice
+ participant Bob
+ Alice->>John: Hello John, how are you?
+ loop Healthcheck
+ John->>John: Fight against hypochondria
+ end
+ Note right of John: Rational thoughts prevail...
+ John-->>Alice: Great!
+ John->>Bob: How about you?
+ Bob-->>John: Jolly good!
+```
diff --git a/docs/development.md b/docs/development.md
new file mode 100644
index 000000000..af2805afd
--- /dev/null
+++ b/docs/development.md
@@ -0,0 +1,119 @@
+# Development
+
+
+## Updating the documentation
+
+We write documention with GitBook.
+
+Please continue with the [mermaid-gitbook](https://github.com/mermaidjs/mermaid-gitbook) project.
+
+
+## How to add a new diagram type
+
+
+### Step 1: Grammar & Parsing
+
+
+#### Grammar
+
+This would be to define a jison grammar for the new diagram type. That should start with a way to identify that the text in the mermaid tag is a diagram of that type. Create a new folder under diagrams for your new diagram type and a parser folder in it. This leads us to step 2.
+
+For instance:
+
+* the flowchart starts with the keyword graph.
+* the sequence diagram starts with the keyword sequenceDiagram
+
+
+#### Store data found during parsing
+
+There are some jison specific sub steps here where the parser stores the data encountered when parsing the diagram, this data is later used by the renderer. You can during the parsing call a object provided to the parser by the user of the parser. This object can be called during parsing for storing data.
+
+```
+statement
+ : 'participant' actor { $$='actor'; }
+ | signal { $$='signal'; }
+ | note_statement { $$='note'; }
+ | 'title' message { yy.setTitle($2); }
+ ;
+```
+
+In the extract of the grammar above, it is defined that a call to the setTitle method in the data object will be done when parsing and the title keyword is encountered.
+
+> **Info** Make sure that the `parseError` function for the parser is defined and calling `mermaidPAI.parseError`. This way a common way of detecting parse errors is provided for the end-user.
+
+For more info look in the example diagram type:
+
+The `yy` object has the following function:
+
+```javascript
+exports.parseError = function(err, hash){
+ mermaidAPI.parseError(err, hash)
+};
+```
+
+when parsing the `yy` object is initialized as per below:
+
+```javascript
+var parser
+parser = exampleParser.parser
+parser.yy = db
+```
+
+
+### Step 2: Rendering
+
+Write a renderer that given the data found during parsing renders the diagram. To look at an example look at sequendeRenderer.js rather then the flowchart renderer as this is a more generic example.
+
+Place the renderer in the diagram folder.
+
+
+### Step 3: Detection of the new diagram type
+
+The second thing to do is to add the capability to detect the new new diagram to type to the detectType in utils.js. The detection should return a key for the new diagram type.
+
+
+### Step 4: The final piece - triggering the rendering
+
+At this point when mermaid is trying to render the diagram, it will detect it as being of the new type but there will be no match when trying to render the diagram. To fix this add a new case in the switch statement in main.js:init this should match the diagram type returned from step #2. The code in this new case statement should call the renderer for the diagram type with the data found by the parser as an argument.
+
+
+## Usage of the parser as a separate module
+
+
+### Setup
+
+```javascript
+var graph = require('./graphDb')
+var flow = require('./parser/flow')
+flow.parser.yy = graph
+```
+
+
+### Parsing
+
+```javascript
+flow.parser.parse(text)
+```
+
+
+### Data extraction
+
+```javascript
+graph.getDirection()
+graph.getVertices()
+graph.getEdges()
+```
+
+The parser is also exposed in the mermaid api by calling:
+
+```javascript
+var parser = mermaid.getParser()
+```
+
+Note that the parse needs a graph object to store the data as per:
+
+```javascript
+flow.parser.yy = graph
+```
+
+Look at `graphDb.js` for more details on that object.
diff --git a/docs/faq.md b/docs/faq.md
new file mode 100644
index 000000000..038a3ae1d
--- /dev/null
+++ b/docs/faq.md
@@ -0,0 +1,8 @@
+1. [How to add title to flowchart?](https://github.com/knsv/mermaid/issues/556#issuecomment-363182217)
+1. [How to specify custom CSS file?](https://github.com/mermaidjs/mermaid.cli/pull/24#issuecomment-373402785)
+1. [How to fix tooltip misplacement issue?](https://github.com/knsv/mermaid/issues/542#issuecomment-3343564621)
+1. [How to specify gantt diagram xAxis format?](https://github.com/knsv/mermaid/issues/269#issuecomment-373229136)
+1. [How to bind an event?](https://github.com/knsv/mermaid/issues/372)
+1. [How to add newline in the text?](https://github.com/knsv/mermaid/issues/384#issuecomment-281339381)
+1. [How to have special characters in link text?](https://github.com/knsv/mermaid/issues/407#issuecomment-329944735)
+1. [How to change flowchart curve style?](https://github.com/knsv/mermaid/issues/580#issuecomment-373929046)
diff --git a/docs/flowchart.md b/docs/flowchart.md
new file mode 100644
index 000000000..00da49ff5
--- /dev/null
+++ b/docs/flowchart.md
@@ -0,0 +1,368 @@
+# Flowcharts - Basic Syntax
+
+## Graph
+
+This statement declares a new graph and the direction of the graph layout.
+
+This declares a graph oriented from top to bottom.
+
+```mermaid
+graph TD
+ Start --> Stop
+```
+
+This declares a graph oriented from left to right.
+
+Possible directions are:
+
+* TB - top bottom
+* BT - bottom top
+* RL - right left
+* LR - left right
+
+* TD - same as TB
+
+```mermaid
+graph LR
+ Start --> Stop
+```
+
+## Nodes & shapes
+
+### A node (default)
+
+```mermaid
+graph LR
+ id
+```
+Note that the id is what is displayed in the box.
+
+### A node with text
+
+It is also possible to set text in the box that differs from the id. If this is done several times, it is the last text
+found for the node that will be used. Also if you define edges for the node later on, you can omit text definitions. The
+one previously defined will be used when rendering the box.
+
+```mermaid
+graph LR
+ id1[This is the text in the box]
+```
+
+
+### A node with round edges
+
+```mermaid
+graph LR
+ id1(This is the text in the box)
+```
+
+### A node in the form of a circle
+
+```mermaid
+graph LR
+ id1((This is the text in the circle))
+```
+
+### A node in an asymetric shape
+
+```mermaid
+graph LR
+ id1>This is the text in the box]
+```
+Currently only the shape above is possible and not its mirror. *This might change with future releases.*
+
+### A node (rhombus)
+
+```mermaid
+graph LR
+ id1{This is the text in the box}
+```
+
+## Links between nodes
+
+Nodes can be connected with links/edges. It is possible to have different types of links or attach a text string to a link.
+
+### A link with arrow head
+
+```mermaid
+graph LR
+ A-->B
+```
+
+### An open link
+
+```mermaid
+graph LR
+ A --- B
+```
+
+### Text on links
+
+```mermaid
+graph LR
+ A-- This is the text ---B
+```
+
+or
+
+```mermaid
+graph LR
+ A---|This is the text|B
+```
+
+### A link with arrow head and text
+
+```mermaid
+graph LR
+ A-->|text|B
+```
+
+or
+
+```mermaid
+graph LR
+ A-- text -->B
+```
+
+### Dotted link
+
+```mermaid
+graph LR;
+ A-.->B;
+```
+
+### Dotted link with text
+
+```mermaid
+graph LR
+ A-. text .-> B
+```
+
+### Thick link
+
+```mermaid
+graph LR
+ A ==> B
+```
+
+### Thick link with text
+
+```mermaid
+graph LR
+ A == text ==> B
+```
+
+## Special characters that break syntax
+
+It is possible to put text within quotes in order to render more troublesome characters. As in the example below:
+
+```mermaid
+graph LR
+ id1["This is the (text) in the box"]
+```
+
+### Entity codes to escape characters
+
+It is possible to escape characters using the syntax examplified here.
+
+```mermaid
+ graph LR
+ A["A double quote:#quot;"] -->B["A dec char:#9829;"]
+```
+
+## Subgraphs
+
+```
+subgraph title
+ graph definition
+end
+```
+
+An example below:
+
+```mermaid
+graph TB
+ c1-->a2
+ subgraph one
+ a1-->a2
+ end
+ subgraph two
+ b1-->b2
+ end
+ subgraph three
+ c1-->c2
+ end
+ ```
+
+
+## Interaction
+
+It is possible to bind a click event to a node, the click can lead to either a javascript callback or to a link which will be opened in a new browser tab.
+
+```
+click nodeId callback
+```
+
+* nodeId is the id of the node
+* callback is the name of a javascript function defined on the page displaying the graph, the function will be called with the nodeId as parameter.
+
+Examples of tooltip usage below:
+
+```
+
+
+
+
+
+
+
+
+
+