From 1a1de95ff5eee5bbff69ca89e4161899a2e79357 Mon Sep 17 00:00:00 2001 From: Neil Cuzon <58763315+NeilCuzon@users.noreply.github.com> Date: Thu, 11 Mar 2021 18:09:43 -0800 Subject: [PATCH] Update n00b-gettingStarted.md --- docs/n00b-gettingStarted.md | 56 +++++++++++-------------------------- 1 file changed, 16 insertions(+), 40 deletions(-) diff --git a/docs/n00b-gettingStarted.md b/docs/n00b-gettingStarted.md index 3b4de6471..1dd06f35b 100644 --- a/docs/n00b-gettingStarted.md +++ b/docs/n00b-gettingStarted.md @@ -51,15 +51,15 @@ Thanks to the growing popularity of mermaid, many plugins already allow the gene **This is covered in greater detail in the [Usage section](usage.md)** -## 3. Deploying mermaid on the Browser +## 3. Deploying mermaid with Inline JavaScript This method can be used with any common web server. Apache, IIS, nginx, node express [...], you pick your favourite. We do not need to install anything on the server, apart from a program (like Notepad++) that can generate an html file, which is then deployed by a web browser (such as Firefox, Chrome, Safari, but not Internet Explorer). -So if you want to really simplify things when testing this out, don't use a web server at all but just create an HTML file locally and drag it into your browser window. The browser will do the work of rendering the mermaid diagrams according to the descriptions you've given! +Just create an HTML file locally and open it using a desired browser. -### Note that all this is written in the html `` section of the web page. +### Written in the html `` section of the web page. When writing the html file, we give the web browser three instructions inside the html code: @@ -70,9 +70,9 @@ b. The mermaid code for the diagram we want to create. c. The `mermaid.initialize()` call to start the rendering process. -## This is what needs to go into the html file (and all of them are important), for the mermaidAPI to render the diagrams: +## Three requirements for the mermaidAPI to render a diagram: -### a. A reference to the address of the `mermaid.js` or the `mermaid.min.js` file has to be contained in a ` - -``` -7. It should look something like this -```html - - -``` -8. Add the graph and diagram definitions as you would in number 3. - a. be mindful of the `div` tags. - -9. Save, load/edit your HTML file to your liking. - - -**Note** placing the HTML file on the same folder the `mermaid` file you've downloaded is a good practice and allows you to shorten the address on the `src` section. - + +4. To add Mermaid as a Dev Dependency + yarn add --dev mermaid + **As seen here, in this full example:** ```html