My personal blog built with Hugo and deployed to GitHub Pages at code.lol.
- Git
- Hugo
- GitHub account with access to deployment repository
Clone the repository and run the setup script:
git clone [email protected]:poteat/personal-web.git
cd personal-web
./setup.shThe setup script will:
- Initialize git submodules (theme and deployment repo)
- Clone the deployment repository
- Verify Hugo is installed
- Build the site
Start the local development server:
hugo server -DThe site will be available at http://localhost:1313 with live reload.
hugo new post/category/my-new-post.mdCategories include: programming, life, algorithms, bioinformatics, simulation
Add <!--more--> in your markdown where you want the preview to end on the homepage:
---
title: "My Post Title"
date: 2024-01-01
---
This is the preview text that appears on the homepage.
<!--more-->
The rest of the content only shows on the full post page.Deploy changes to GitHub Pages:
./deploy.shThe deployment script will:
- Build the site with Hugo
- Show you what changes will be deployed
- Ask for confirmation
- Prompt for a commit message
- Push to the
poteat.github.iorepository
Your changes will be live at https://code.lol within a few minutes.
personal-web/
├── content/ # Blog posts and pages
│ ├── post/ # Blog posts organized by category
│ ├── about.md # About page
│ └── contact.md # Contact page
├── themes/
│ └── mainroad/ # Hugo theme (git submodule)
├── poteat.github.io/ # Deployment repository (git submodule)
├── static/ # Static assets (images, etc.)
├── config.toml # Hugo configuration
├── setup.sh # Initial setup script
└── deploy.sh # Deployment script
If you prefer manual commands over the scripts:
hugo -d poteat.github.iocd poteat.github.io
git add -A
git commit -m "Update site"
git push origin master
cd ..