This website is built using Docusaurus, a modern static website generator.
This repository hosts a developer blog built with Docusaurus. It includes tools and scripts for creating, managing, and deploying static web content. The software supports rapid local development, customizable theming, and seamless deployment to platforms like GitHub Pages or NGINX.
- Node.js (v16 or later recommended)
- pnpm (package manager for faster and more efficient dependency handling)
- Docker (only required if deploying using NGINX)
-
Installation
$ pnpm install -
Local Development
$ pnpm startThis command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
-
Build
$ pnpm buildThis command generates static content into the
builddirectory and can be served using any static contents hosting service. -
Deployment
In order to deploy onto Github Pages, ensure that your
docusaurus.config.tsconforms with the documentation guidelines. After that is ensured run the following command to deploy:$ USE_SSH=true pnpm deploy
For detailed information about deploying this Docusaurus project, refer to the Deployment section below.
The repository is organized as follows:
blog/: Contains markdown files for blog posts. Blog-related metadata is automatically picked up by the Docusaurus configuration.docs/: Contains markdown files for documentation. These files are referenced insidebars.tsto define the sidebar structure.src/: Contains custom React components, CSS, and JavaScript for additional functionality or theming.static/: Stores static assets (e.g., images, icons) served directly without processing.sidebars.ts: Configures the structure of sidebars in the documentation section.docusaurus.config.ts: Main configuration file for customizing and managing Docusaurus behavior.build/: Generated after running thepnpm buildcommand. Contains the static website files ready for deployment.
New content can be added as follows:
- Add new documentation files to the
docs/folder. - Add new blog posts to the
blog/folder. No additional configuration is required.
To deploy using SSH:
$ USE_SSH=true pnpm deploy
To deploy without using SSH, run:
$ GIT_USER=<Your GitHub username> pnpm deploy
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.
To deploy the site using NGINX and Docker, follow this guide