This is my personal portfolio website built with React, TypeScript, and Tailwind CSS.
The portfolio is published at: nirajkamal.github.io
src/- Source code for the React applicationcomponents/- Reusable React componentspages/- Page componentsassets/- Static assets (images, markdown files, etc.)blogs/- Blog content in markdown formatprojects/- Project content in markdown format
build.py- Python script to generate components from markdown filesbuild_blogs.py- Python script to generate blog componentsbuild_projects.py- Python script to generate project componentsglobal.md- Configuration for header and footer
-
Install required dependencies:
npm install gh-pages --save-dev
-
Update
package.jsonwith homepage and deployment scripts:"homepage": "https://nirajkamal.github.io", "scripts": { "predeploy": "npm run build", "deploy": "gh-pages -d dist" }
-
Configure Vite for GitHub Pages in
vite.config.ts:export default defineConfig({ base: '/', build: { outDir: 'dist', }, // other configuration... });
To publish updates to GitHub Pages:
- Make your changes to the codebase
- Generate components from markdown (if needed):
python build.py python build_blogs.py python build_projects.py
- Deploy to GitHub Pages:
npm run deploy
This will build the project and publish it to the gh-pages branch, which GitHub Pages will serve from.
To start the development server:
npm run devTo build the project locally:
npm run build- Header and Footer: Edit
src/global.md - Homepage Sections: Edit
src/home.md - Blog Posts: Add/edit files in
src/assets/blogs/ - Projects: Add/edit files in
src/assets/projects/ - Resume: Update the PDF file at
src/assets/resume.pdf
See the README files in the respective directories for more detailed instructions.