The source of my personal website, built with Hugo and deployed to GitHub Pages.
This repository holds everything for otype.de. The older address otype.github.io forwards to it automatically, so there is one site, not two copies. It is based on the hugo-goa theme, included as a git submodule.
- 🧱 Hugo plus a small theme override. The theme is a submodule; only the header and footer partials and a little CSS are changed here.
- 🔒 No third-party requests on page load. Fonts, Bootstrap, Font Awesome and highlight.js are self-hosted (see
VENDORED_ASSETS.md). - 🚀 Deploys itself. A GitHub Actions workflow builds and publishes the site whenever
mainchanges.
otype.github.io/
├── hugo.toml site config: URL, author, intro, social links
├── content/posts/ blog posts (Markdown)
├── archetypes/default.md template for new posts (starts as a draft)
├── layouts/partials/ header and footer overrides for the theme
├── assets/img/, static/img/ author photos
├── static/css/custom.css the site's own styles
├── static/fonts/, static/vendor/ self-hosted fonts and libraries
├── themes/hugo-goa/ the theme (git submodule)
├── .github/workflows/ hugo.yaml, the Pages deployment
├── Makefile shortcuts for running and building locally
└── VENDORED_ASSETS.md where the self-hosted files come from, and when to re-check them
- Hugo, for example
sudo pacman -S hugoon Arch. The workflow uses the extended build and pins the version inHUGO_VERSION(currently 0.162.1), so a newer Hugo locally is fine. - git. The GitHub CLI is optional, it only makes cloning shorter.
The theme is a submodule, so clone with --recurse-submodules:
$ git clone --recurse-submodules https://github.com/otype/otype.github.io.git
$ cd otype.github.ioIf you cloned without it, fetch the theme afterwards (make setup runs the same command):
$ git submodule update --init$ hugo server # http://localhost:1313, live-reloads on save (same as: make run)
$ hugo server -D # also shows draftsmake build builds once into public/ and includes drafts (hugo -D). make clean removes public/ and docs/.
$ hugo new posts/my-post.mdNew posts come from the archetype with draft: true. The deployment builds without drafts, so a post only goes live once you set draft: false in its front matter. The existing my-first-post.md is still a draft, so it is not published.
Make your change on a branch and open a pull request. When it is merged into main, the workflow hugo.yaml runs by itself. You can also start it by hand from the Actions tab (workflow_dispatch).
- install the pinned extended Hugo,
- check out the repo including the theme submodule,
- build with
hugo --gc --minifyfor the Pages base URL, - upload
public/and publish it withactions/deploy-pages.
Only one deploy runs at a time. The repository's Pages source is set to GitHub Actions and the custom domain is otype.de (Settings → Pages), with HTTPS enforced.
Update the theme to its latest version and commit the new submodule pointer:
$ git submodule update --remote themes/hugo-goaThe self-hosted libraries have no update automation. Re-check them against the "Where to check" links in VENDORED_ASSETS.md every 6 to 12 months, or sooner when a CVE for one of them is announced.