Upgrading my blog to Docusaurus 3.0 was mostly a foundation change, but it surfaced real gotchas. The MDX v3 checker failed on two posts because unescaped โ{โ characters in connection strings, so I moved them into code blocks. I learned more about npm, semantic versioning, and package-lock realities, plus updated Prism renderer config after themes moved and defaults changed again.
Tag: docusaurus
Syntax Highlighting in Docusaurus
Docusaurus uses Prism for syntax highlighting, and thatโs a big win when you write about niche languages like DAX and Power Query (M). In this post I walk through adding extra Prism languages in docusaurus.config.js, restarting the site, and using the right code-fence aliases. I also show how to swap Prism themes for light/dark mode to match your siteโs look
Using Environment Variables in Docusaurus
Using environment variables allows us to to store configuration values outside of the source files. During the build, the reference to the environment variable will be replaced with the values specified. The configuration data is the part of the project that can vary between test and production. Storing the configuration values in one place it … Continue reading Using Environment Variables in Docusaurus
Adding Comments to Docusaurus
Docusaurus canโt read Node environment variables directly in components, so I use dotenv to load a .env file into process.env, then pass values through customFields in docusaurus.config.js. I show installing dotenv, testing with console.log, and wiring variables into Giscus comments. For dev vs prod, NODE_ENV selects different .env pathsโkeeping secrets and config out of source for builds and deployments.
Adding Icons to Docusaurus
Your docs site looks solidโฆ until you notice every tab shows the same generic icon. In this post, I walk through giving Docusaurus a real identity by adding a favicon and custom iconsโso your blog looks polished in browser tabs, bookmarks, and mobile home screens. Itโs a quick win with a surprisingly big impact, and itโs easier than you think.





You must be logged in to post a comment.