DEV Community

Maxim Nosov ✪
Maxim Nosov ✪

Posted on

4

Working with SSG Docusaurus

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

Sentry blog image

How to reduce TTFB

In the past few years in the web dev world, we’ve seen a significant push towards rendering our websites on the server. Doing so is better for SEO and performs better on low-powered devices, but one thing we had to sacrifice is TTFB.

In this article, we’ll see how we can identify what makes our TTFB high so we can fix it.

Read more

Top comments (0)

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay