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:
Clone the Repositoryβ
Start by cloning the CodeHarborHub repository from GitHub:
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:
- npm (recommended)
- Yarn
npm install
yarn 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:
- npm
- Yarn
npm start
yarn 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:
- npm
- Yarn
npm run build
yarn 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:
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:
git pull origin main
npm install # or yarn install
Check the installed Docusaurus version:
npx docusaurus --version
Troubleshootingβ
Having issues? Try these:
- Clear the cache:
rm -rf node_modules .docusaurus build
npm install
-
Ensure Node.js is updated to the latest LTS version.
-
Ask for help on:
π 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.