Skip to content

paulo-amaral/easy-sop-docs

Repository files navigation

HOWTO INSTALL

Please follow the steps bellow to install docusaurus for local development and build the static website.

Template

This template is built using Docusaurus 2, a modern static website generator, to provide a documentation system.

Prerequistes

Install NodeJS :

sudo apt-get install curl software-properties-common 
curl -sL https://deb.nodesource.com/setup_16.x | sudo bash - 
apt update
apt install nodejs npm
npm -v
nvm -v

Docusaurus

1 - Clone repo and install

git clone https://github.com/paulo-amaral/easy-sop-docs.git
cd easy-sop-docs
npm install

2 - Local Development

npm run start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

3 - Build

npm run build

This command generates static content into the build directory and can be served using any static contents hosting service.

4 - Deployment with Docker and Docker compose

Install search

Docussaurus doesn't have support to offline search(check docusaurus docs).

The search is based on: https://github.com/lelouch77/docusaurus-lunr-search

Setup docusaurus for mermaid(diagrams)

npm i mdx-mermaid mermaid

Configure in Docusaurus

don't forget to change docusaurus.config.js

Add

require('mdx-mermaid')

to remarkPlugins

into docusaurus.config.js

presets: [
    [
      '@docusaurus/preset-classic',
      {
        docs: {
          remarkPlugins: [require('mdx-mermaid')],