A Hugo-based static site generator with LaTeX document compilation and automated deployment to GitHub Pages.
This repository generates a static website from Markdown and LaTeX sources:
- Compiles LaTeX documents to PDFs (with smart caching)
- Builds a Hugo static site from Markdown content
- Formats HTML output with prettier
- Deploys to GitHub Pages via a dual-repository structure
- Source repository (this repo): Hugo source, LaTeX files, and build scripts
- Public repository (
public/): Git submodule pointing to stvhay.github.io for GitHub Pages hosting
LaTeX documents are listed in latex/latex.manifest. The build system embeds a SHA-384 hash into each PDF's metadata, only recompiling when the source changes.
# Debian/Ubuntu
apt install hugo texlive-latex-base texlive-latex-extra \
texlive-bibtex-extra latexmk biber libimage-exiftool-perl
# Node.js packages
npm install --save-dev --save-exact prettier
# Initialize public/ repository
git clone git@github.com:stvhay/stvhay.github.io.git public./build - Compiles LaTeX, builds Hugo site, formats HTML, stages changes.
./publish [message] - Commits and pushes to both repositories.
Source utilities.sh for shell helpers:
source utilities.sh
post "My New Article" # Creates content/writing/my-new-article/index.md
post --page portfolio "My Project" # Creates content/portfolio/my-project/index.md
post --single "Quick Note" # Creates single .md file instead of bundlecontent/ # Hugo content (Markdown)
├── portfolio/ # Portfolio items
├── writing/ # Blog posts
├── about.md
└── contact.md
layouts/ # Hugo templates
static/ # Static assets
latex/ # LaTeX sources + latex.manifest
public/ # Generated site (git submodule)
utilities/ # Build script modules
- Create content with
postor manually - Add LaTeX docs to
latex/and updatelatex.manifest - Build locally with
./build - Deploy with
./publish "message"
GitHub Actions builds and deploys on push to main. See .github/workflows/website.yml.
- Hugo - Static site generator
- pdfTeX via latexmk - LaTeX compilation
- prettier - HTML formatting
- exiftool - PDF metadata for build caching
- GitHub Pages - Hosting
This project is developed with Claude Code as an AI coding assistant. Commits co-authored by Claude are marked with Co-Authored-By: Claude <noreply@anthropic.com>.