This website is built using Docusaurus v3.7.0, a modern static website generator.
- Node.js: Version 18.0 or higher is required (package.json specifies
"node": ">=18.0") - this project uses v22.15.1 - Package Manager: npm or yarn
Using Node Version Manager (nvm) is recommended for managing Node.js versions:
# Install nvm (if not already installed)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
# Set up nvm in your shell profile (~/.zshrc or ~/.bash_profile)
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# Install and use Node.js
nvm install 22 # or any newer version like 22.15.1 used in this project
nvm use 22Use npm:
npm installOr if you prefer yarn:
yarnStart the development server:
npm startOr with yarn:
yarn startTo make your site accessible from other devices on your network, use:
npm start -- --host 0.0.0.0This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
Generate a static build:
npm run buildOr with yarn:
yarn buildThis command generates static content into the build directory and can be served using any static contents hosting service.
To preview the build locally:
npm run serveOr with yarn:
yarn serveTo make your production build accessible from other devices on your network:
npm run serve -- --host 0.0.0.0You can also specify a custom port if needed:
npm run serve -- --host 0.0.0.0 --port 8000Using SSH:
USE_SSH=true npm run deployNot using SSH:
GIT_USER=<Your GitHub username> npm run deployIf you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.
You can also run the Docusaurus site as a Docker container while using the build directory from your local filesystem:
npm run buildBuild and run the Docker container:
# Build the Docker image
docker build -t techdocs .
# Run the container with a volume mount to your local build directory
# The 0.0.0.0 binds to all network interfaces, making the site accessible from other devices
docker run -p 0.0.0.0:3000:3000 -v "$(pwd)/build:/app/build" techdocs# Build the container (add --no-cache to rebuild from scratch)
docker compose build
# Start the container
docker compose up -d
# View logs
docker container logs techdocs-techdocs-1
# Stop the container
docker compose downThe site will be available at http://localhost:3000 and also accessible from other devices on your network at http://YOUR_IP:3000.
If you're using nvm but Node.js is not recognized in your terminal, ensure that your shell configuration includes the nvm setup:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"You may need to restart your terminal or run source ~/.zshrc (or your appropriate shell config file) for changes to take effect.