How the Build Works
build.sh runs the whole pipeline, driven by GitHub Actions. Here's what it does, step by step.
1. Setup & metadata
- Detects the repo owner (
GITHUB_REPOSITORY_OWNER, falling back tonotamitgamerlocally) - Resolves the site's base URL from a configured Pages CNAME, or falls back to
https://<username>.github.io - Captures the git-mirror repo's own commit hash and build timestamp for the footer
2. Copy root assets
style.css, favicon.png, logo.png, and icon.png are copied from assets/ into the site root (with favicon.png also duplicated as favicon.ico).
3. Fetch & process each public repository
For every public repo (minus the filtered ones):
- Clone it as a bare repo into
raw_repos/ - Overwrite stagit's placeholder
descriptionandownerfiles - Run
stagitto generate the standard Log / Files / Refs / README / LICENSE pages - Copy
style.css,logo.png, andfavicon.pnginto that repo's subfolder - Inject an Activity link into stagit's nav bar on every generated page
- Generate a custom
activity.htmlpage with:- Clone URL and GitHub link
- Last commit hash + timestamp
- Approximate repo size
- A small dependency-free SVG bar graph of weekly commit activity
- Inject a recursive, collapsible folder tree script into
files.html, with hash-based URLs (#folder=path/to/dir) so specific folders can be linked directly and auto-expanded - Add a static breadcrumb to every individual file page under
file/, built by walking the file's path - Write a
last_commitfile into the repo subfolder recording the mirror's build metadata
4. Generate the central index
stagit-index runs over all the bare repos to produce the root site/index.html landing page, listing every mirrored repository.
5. Site-wide finishing touches
- Injects a formatted build-info footer (owner, build time, git-mirror commit, stagit credit) into every generated HTML page
- Copies
CNAMEinto the site output, if present - Injects a mobile viewport meta tag into every page's
<head> - Generates
sitemap.xmlfrom every HTML file in the output - Generates a styled
404.html
The final output lands in ./site, ready to be deployed via GitHub Pages.