Index page of the mods published by DarkbordermanModding. It is a static page with no build step, served by GitHub Pages from master.
data/mods.jsonis the single source of truth for what is listed. Entries are keyed by repo name.index.htmlandassets/render that file as a grid or a list, with a game filter and search.scripts/sync_mod.pybuilds one entry from a mod repo'smetadata.ymland upserts or removes it indata/mods.json..github/workflows/sync-mod.ymlruns the script and commits the result tomaster.
mod repo push to master
└─ .github/workflows/pages-sync.yml
└─ DarkbordermanModding/github-actions/.github/workflows/pages-notify.yml
└─ repository_dispatch "mod-updated" { repo, ref, sha } ─┐
│
darkbordermanmodding.github.io │
└─ sync-mod.yml ◄──────────────────────────────────────────────────┘
└─ scripts/sync_mod.py <repo> → data/mods.json → commit → Pages redeploy
-
Add
.github/workflows/pages-sync.ymlto the mod repo:name: Sync to mod page on: push: branches: [master] paths: [metadata.yml, "preview.*", "thumbnail.*", "description_*.md", README.md] workflow_dispatch: jobs: notify: uses: DarkbordermanModding/github-actions/.github/workflows/pages-notify.yml@master secrets: inherit
-
Push it, or run it once from the Actions tab. The mod appears after
sync-mod.ymlfinishes here.
The workflow needs the org secret PAGES_DISPATCH_TOKEN: a fine-grained PAT with Contents: read and write on this repo only.
Run Sync mod data from this repo's Actions tab:
repo: one or more repo names separated by spaces, orallto refresh every listed mod.remove: tick it to take the listed repo(s) off the page.
Locally: python scripts/sync_mod.py <repo> [<repo> ...], --all or --remove. Install pyyaml and requests first. Set GITHUB_TOKEN to avoid API rate limits.
The script reads the mod's metadata.yml and uses the first value it finds. An optional page: section overrides everything:
page:
title: More Learnable Spells # default: workshop english title → workshop.title → repo name
game: Elin # default: repo-name prefix (e.g. "Stellaris-..." → Stellaris)
summary: One-line description # default: github.description → workshop description → GitHub repo description
description_path: description_english.md # default: workshop english description_path
preview_path: preview.png # default: workshop.preview_path → preview.png / preview.jpg / thumbnail.png
hidden: true # remove the mod from the page on next sync- Leading version tags in titles, such as
[0.23.229], are removed. - The Steam Workshop link is shown only when
workshop.visibilityis 0 (public) or 3 (unlisted). - Re-syncing a mod whose content has not changed leaves
data/mods.jsonuntouched.
python -m http.serverThen open http://localhost:8000.