Build system for https://writings.agg.im/ and https://github.com/agg23/writings. Pulls in static docs from https://github.com/agg23/writings and specific other repos containing writings and pulls them into a single Hugo site.
- Hugo v0.151.0
- Python 3.9+
- git and rsync for fetching content
# Fetch content from a local checkout and build the site
WRITINGS_SOURCE=/Users/adam/code/writings ./scripts/build.shKey scripts live in scripts/:
fetch_writings.shclones/copies the writings repo intotmp/writings-src. UseWRITINGS_REPO_URL,WRITINGS_SOURCE, and optionallyWRITINGS_REFto control the source.sync_content.shconverts the fetched repo into Hugo-ready content undercontent/postsand static assets understatic/.build.shruns the full pipeline (fetch → sync →hugo). SetSKIP_FETCH=1orSKIP_SYNC=1to reuse prior outputs.
Generated Hugo content lives under content/posts and is ignored by git aside from the checked-in _index.md. Assets from the writings repo are copied into static/images and static/writings/.
- Ensure the writings repo is available (either locally or via a remote URL).
- Run
./scripts/build.shto generate content and produce the Hugo site inpublic/. - Use
SKIP_FETCH=1withhugo serverfor rapid iteration:./scripts/fetch_writings.sh ./scripts/sync_content.sh SKIP_FETCH=1 SKIP_SYNC=1 hugo server --source . --disableFastRender