This repository contains the source code for Harold Nikoue's personal website, hosted on GitHub Pages. The website serves as a repository of what I'm learning and the projects I'm working on.
Live Site: https://haroldinho.github.io
The website is built using Jekyll and the Chirpy theme.
- Prerequisites
- Local Development
- GitHub Actions Deployment
- Adding New Posts
- Project Structure
- License
Before you begin, ensure you have the following installed:
- Ruby (version 3.3 or compatible)
- Bundler (Ruby gem manager)
- Install:
gem install bundler
- Install:
- Node.js (version 18 or higher)
- Check your Node version:
node --version - Download from nodejs.org
- Check your Node version:
- npm (comes with Node.js)
- Check your npm version:
npm --version
- Check your npm version:
Follow these steps to run the website locally on your machine:
git clone https://github.com/Haroldinho/Haroldinho.github.io.git
cd Haroldinho.github.iobundle installThis will install all the Jekyll plugins and dependencies specified in the Gemfile.
npm installThis will install the frontend dependencies (Bootstrap, Popper.js, etc.) and build tools.
Before running the site, you need to build the CSS and JavaScript assets:
npm run buildThis command will:
- Build and minify CSS using PurgeCSS
- Bundle and minify JavaScript using Rollup
Start the local development server:
bundle exec jekyll serveOr with live reload enabled:
bundle exec jekyll serve --livereloadThe site will be available at http://localhost:4000 (or the port shown in the terminal).
If you're making changes to JavaScript or SCSS files, you can run the watch command in a separate terminal:
npm run watch:jsThis will automatically rebuild JavaScript files when you make changes.
- Port already in use: If port 4000 is busy, use
bundle exec jekyll serve --port 4001 - Dependencies issues: Try
bundle updateandnpm update - Build errors: Make sure you've run
npm run buildbefore starting the server
The website is automatically deployed to GitHub Pages using GitHub Actions whenever you push changes to the main branch.
The deployment workflow (.github/workflows/pages-deploy.yml) automatically:
-
Triggers on:
- Push to
mainormasterbranch - Manual trigger from the Actions tab (workflow_dispatch)
- Ignores changes to
.gitignore,README.md, andLICENSE
- Push to
-
Build Process:
- Checks out the repository
- Sets up Ruby 3.3 and installs dependencies
- Builds the Jekyll site in production mode
- Tests the site using HTMLProofer (checks for broken links)
- Uploads the built site as an artifact
-
Deployment:
- Deploys the built site to GitHub Pages
- The site is available at
https://haroldinho.github.io
You can manually trigger a deployment:
- Go to the Actions tab in your GitHub repository
- Select Build and Deploy workflow
- Click Run workflow
- Select the branch (usually
main) and click Run workflow
- Check the Actions tab to see the status of recent deployments
- Green checkmark = successful deployment
- Red X = deployment failed (check logs for errors)
- Build failures: Check the Actions logs for specific error messages
- Missing dependencies: Ensure
Gemfileandpackage.jsonare up to date - HTML validation errors: HTMLProofer may catch broken links or invalid HTML
To add a new blog post:
- Create a new Markdown file in the
_posts/directory - Name the file using the format:
YYYY-MM-DD-post-title.md- Example:
2025-01-15-my-new-post.md
- Example:
- Add front matter at the top of the file:
---
title: Your Post Title
date: 2025-01-15
categories: [Category Name]
tags: [tag1, tag2]
---- Write your content in Markdown below the front matter
- Commit and push to trigger automatic deployment
Place images in assets/img/ or _posts/figures/ and reference them in your posts:
.
├── _config.yml # Jekyll configuration
├── _posts/ # Blog posts (Markdown files)
├── _tabs/ # Navigation tabs (About, Archives, etc.)
├── _sass/ # SCSS stylesheets
├── _javascript/ # JavaScript source files
├── _includes/ # Jekyll includes (reusable components)
├── _layouts/ # Page layouts
├── _data/ # Data files (authors, locales, etc.)
├── assets/ # Static assets (images, CSS, JS)
├── .github/
│ └── workflows/ # GitHub Actions workflows
├── Gemfile # Ruby dependencies
├── package.json # Node.js dependencies
└── README.md # This file
This project is published under MIT License.