Skip to main content

Installation

CodeHarborHub is built with Docusaurus and a modern React ecosystem. This guide will help you clone the repository, install dependencies, and start the local development server.

Requirements​

Before starting, ensure your system meets these prerequisites:

  • Node.js v20.0 or later (Check with node -v). We recommend using nvm to manage Node.js versions.

  • Git for cloning the repository.

  • A package manager:

    • npm (comes with Node.js) or
    • yarn if you prefer Yarn.

Clone the Repository​

Start by cloning the CodeHarborHub repository from GitHub:

terminal
git clone https://github.com/CodeHarborHub/codeharborhub.github.io.git
cd codeharborhub.github.io

This will create a folder named codeharborhub.github.io with all source files.

Install Dependencies​

Install all required packages:

terminal
npm install

This may take a few minutes depending on your internet speed.

Run the Development Server​

Start the local development server to preview the site:

terminal
npm start

A browser window should automatically open at πŸ‘‰ http://localhost:3000

Any edits to docs or pages will refresh automaticallyβ€”no manual reload needed.

Build for Production​

To generate an optimized production build:

terminal
npm run build

The static site will be generated inside the /build directory. You can deploy this folder to GitHub Pages, Netlify, Vercel, or any static hosting provider.

For deployment guides, see our Deployment Docs.

Project Structure​

After installation, your folder will look like this:

Structure
codeharborhub.github.io
β”œβ”€β”€ blog # Blog posts
β”œβ”€β”€ docs # Documentation (this page!)
β”œβ”€β”€ src # React components & custom pages
β”‚ β”œβ”€β”€ css
β”‚ └── pages
β”œβ”€β”€ static # Static assets (images, icons)
β”œβ”€β”€ docusaurus.config.js # Site configuration
β”œβ”€β”€ sidebars.js # Sidebar navigation config
β”œβ”€β”€ package.json
└── README.md
  • /docs/ – Markdown/MDX documentation files.
  • /src/ – React components, layouts, and custom pages.
  • /static/ – Images, logos, and other static resources.
  • docusaurus.config.js – Main site configuration.

Updating CodeHarborHub​

To pull the latest updates from GitHub:

terminal
git pull origin main
npm install # or yarn install

Check the installed Docusaurus version:

terminal
npx docusaurus --version

Troubleshooting​

Having issues? Try these:

  • Clear the cache:
terminal
rm -rf node_modules .docusaurus build
npm install

πŸŽ‰ You’re ready! Your local development environment for CodeHarborHub is now live. Start exploring, editing, and contributing to build the world’s best free tech-learning platform.