4 posts tagged with "docusaurus"View All Tags
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 makes it easy to update the values outside of the source code. As dotenv points out this is based on The Twelve-Factor methodology of storing configuration data separate from the code. I will show how I added environment variables to Docusaurus.
Adding Comments to Docusaurus
Static site generators like Hugo and Docusaurus have different levels of support for comment systems. The current version of Docusaurus does not have a built-in commenting system. With Hugo, it depends on whether the theme you are using has added support for additional commenting systems. It could have Disqus, Giscus, or Utterances to name a few. With any of the static site generators, you can customize and add your favorite comment system to it. This involves adding some code and specifying in the front matter that you want comments enabled. Here is how I added comments to Docusaurus for my blog.
Adding Icons to Docusaurus
Instead of the links in the navigation bar that have text such as LinkedIn, I want to display the icon. I will show how I added icons to Docusaurus for Email, Twitter, Github, and LinkedIn. The method I use is self-hosting with Font Awesome - Web Fonts + CSS.