This week I had a chance too explore Docusaurus, a tool that helps developers create a documentation React site fast and customizable. There are a lot of ways to customize a Docusaurus site, I tried adding some markdown files in the pages folder as well as customizing a sidebar by editing the file sidebar.js
and pass it into @docusaurus/plugin-docs
. It was great, I didn't have to code at all :)
Inspired by Docusaurus, I decided to make my SSG project fully support parsing markdown files. I chose showdown to do the job for me. I will also implement code highlighting when I have a chance.
By introducing showdown
into my project, I was able to clean my code up quite drastically. I also removed html-creator
module and used raw string interpolation to render html. I ended up reducing about 100 lines of code and refactoring some incorrect async behavior.
You can take a look at the commit and my Docusaurus demo site
Top comments (0)