Working with SSG Docusaurus
Maxim Nosov ✪

Maxim Nosov ✪ @mnosov622

About: Creative front-end developer with more than 2 years of experience in enterprise companies and startups. Proficient in HTML, CSS, JavaScript, React. Passionate about UX and UI.

Location:
Toronto, Canada
Joined:
Sep 5, 2022

Working with SSG Docusaurus

Publish Date: Oct 24 '22
6 0

Hi !

This week, I've been working with open source static site generator SSG called Docusaurus build with React.

Setting up Docusaurus project wasn't hard.

Feature

Docusaurus has dark and light modes for their website. It allows users to adjust website look based on their preferences, which gives user better UX.

I decided to take this feature from them and implement it on my static site generator.

Implementation

Since, docusaurus is an open-sourse project, then I just copied the icons from them for dark/light modes :)

After that, I added some classes for dark modes and wrote functionality in vanilla JS.

Last but not least

Another important thing I added to my SSG is that when user refreshes the page, he might lose the preferred mode. Now the selected mode is saved to localstorage.

Overall

There are so many great features to take from Docusaurus and in the future I will add more!

Software is never done

Comments 0 total

    Add comment