A personal portfolio website built with Hugo static site generator and automatically deployed to GitHub Pages.
Visit the live site at: https://martincarapia.github.io/
Before you begin, ensure you have the following installed:
- Hugo Extended (v0.120.4 or later)
- Git
- Go (optional, for Hugo modules)
macOS (using Homebrew):
brew install hugoWindows (using Chocolatey):
choco install hugo-extendedLinux (using Snap):
sudo snap install hugogit clone https://github.com/martincarapia/martincarapia.github.io.git
cd martincarapia.github.ioIf using Hugo modules or themes with dependencies:
hugo mod downloadStart the local development server:
hugo serverOr with draft content and live reload:
hugo server --buildDrafts --buildFuture --disableFastRenderThe site will be available at http://localhost:1313
Generate static files for production:
hugo --minifyThe generated files will be in the public/ directory.
βββ .github/
β βββ workflows/
β βββ deploy.yml # GitHub Actions deployment workflow
βββ archetypes/
β βββ default.md # Content templates
βββ assets/ # Sass files, JS, images for processing
βββ content/
β βββ _index.md # Homepage content
β βββ about.md # About page
β βββ blogs/ # Blog posts
βββ data/ # Data files (YAML, JSON, TOML)
βββ layouts/ # HTML templates
βββ static/ # Static files (images, CSS, JS)
βββ themes/ # Hugo themes
βββ hugo.yaml # Hugo configuration
βββ .gitignore # Git ignore rules
Create a new blog post:
hugo new content/blogs/my-new-post.mdCreate a new page:
hugo new content/my-new-page.md---
title: "My Awesome Post"
date: 2023-12-01T10:00:00Z
draft: false
description: "A brief description of the post"
tags: ["hugo", "web development"]
categories: ["blog"]
---
Your content here...Main site configuration is in hugo.yaml. Key settings:
baseURL: 'https://martincarapia.github.io/'
languageCode: 'en-us'
title: 'My Portfolio Site'
theme: 'your-theme'
params:
author: 'Your Name'
description: 'Your site description'- Custom CSS: Add files to
assets/css/ - Images: Place in
static/images/ - JavaScript: Add to
assets/js/
This site uses GitHub Actions for automatic deployment to GitHub Pages.
Every push to the main branch automatically:
- Builds the Hugo site
- Deploys to GitHub Pages
- Makes the site live at
https://martincarapia.github.io/
You can also trigger deployment manually:
- Go to the "Actions" tab in your GitHub repository
- Select "Deploy Hugo site to GitHub Pages"
- Click "Run workflow"
git checkout -b feature/new-feature- Edit content in
content/ - Modify layouts in
layouts/ - Update styles in
assets/
hugo server --buildDraftsgit add .
git commit -m "Add new feature"
git push origin feature/new-feature- Open a PR on GitHub
- Review changes
- Merge to
mainfor automatic deployment
Add your GA4 measurement ID in hugo.yaml:
googleAnalytics: 'G-XXXXXXXXXX'- Set proper
titleanddescriptionin front matter - Use descriptive filenames and URLs
- Optimize images (use WebP when possible)
- Generate sitemap automatically with Hugo
Hugo server not starting:
# Check Hugo version
hugo version
# Clear Hugo cache
hugo mod cleanBuild failing in GitHub Actions:
- Check the Actions tab for detailed error logs
- Ensure all required files are committed
- Verify Hugo version compatibility
Styles not loading:
- Check file paths in templates
- Ensure CSS files are in the correct directory
- Clear browser cache
This project is licensed under the MIT License - see the LICENSE file for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Website: https://martincarapia.github.io/
- Email: martin.carapia@outlook.com
- GitHub: @martincarapia