Build documentation page with Docusaurus 2

There’s quite number of times we need to have a documentation page. Build them with mkdocs or readthedoc is fine but not pretty enough.

Photo by Amy Baugess on Unsplash

What you need to prepare

  • Nodejs
  • Yarn
  • and an IDE


Define information for docusaurus project, including structure of the page, url.


List of libraries needed


The purpose of a lock file is to lock down the versions of the dependencies specified in a package.json file. This means that in a yarn.lock file, there is an identifier for every dependency and sub dependency that is used for a project.


src folder

Define list of css and html structure, theme for the web site.


List of markdown files for page content.


List of blog in markdown format.

Run command

yarn run docusaurus serve --build --port 80 --host

Resource code you can find in here.

Thanks for reading my post.


A passionate automation engineer who strongly believes in “A man can do anything he wants if he puts in the work”.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store