Skip to main content

Dev Documentation with Docusaurus

· 2 min read
Luong

Docusaurus is a great tool to set up documentations for a software project, set of features included such as a homepage, documentations, blogs. etc. Docusaurus is simple to use, requires a little Javascript skills to install, develop more functions. Contents in Docusaurus are composed by Markdown or MDX, friendly markup languages. For a plus, it is developed by Meta team, this ensures for long-term maintenance.

To see how great this tool is, visit Docusaurus homepage, that is exactly what this tool can do for you easily. Of course, my simple blog you are reading here is also done by Docusaurus. Docusaurus homepage

Install

To install a project with Docusaurus, you need Node.js version 18.0 or above installed. Then run the following command to scaffold the project bundled with sample data:

npx create-docusaurus@latest my-website classic --typescript

Edit files in /blog, /docs, or /src/pages (homepage) with Markdown language, then preview changes.

Run on Development

To run the website at your local development and watch changes:

cd my-website
npm run start

Run on Production

Create an account at GitHub pages or Vercel, then hook it to your Github repository, and everything is deployed automatically. Basically, these hosting providers proceed building code and start services for you. I prefer Vercel because it is super easy in deployment with SSL support and domain linking.

npm run build

For code of my simple blog, you can check here and feel free to give me any feedback. Thank you.