Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

darkbordermanmodding.github.io

Index page of the mods published by DarkbordermanModding. It is a static page with no build step, served by GitHub Pages from master.

How a mod gets updated

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

Opting a mod in

  1. Add .github/workflows/pages-sync.yml to 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
  2. Push it, or run it once from the Actions tab. The mod appears after sync-mod.yml finishes here.

The workflow needs the org secret PAGES_DISPATCH_TOKEN: a fine-grained PAT with Contents: read and write on this repo only.

Manual sync and removal

Run Sync mod data from this repo's Actions tab:

  • repo: one or more repo names separated by spaces, or all to 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.

Where each field comes from

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.visibility is 0 (public) or 3 (unlisted).
  • Re-syncing a mod whose content has not changed leaves data/mods.json untouched.

Preview locally

python -m http.server

Then open http://localhost:8000.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages