[PR #1596] [MERGED] Website: /mods, Horizon's registry of mods, modpacks and resource packs #3619

Closed
opened 2026-11-03 04:10:50 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1596
Author: @ludovic111
Created: 10/24/2026
Status: ✅ Merged
Merged: 10/25/2026
Merged by: @ludovic111

Base: main ← Head: feat/website-mods


📝 Commits (2)

  • 787c3a2 Website: /mods, Horizon's registry of mods, modpacks and resource packs
  • 65fa108 Merge origin/main into feat/website-mods

📊 Changes

8 files changed (+383 additions, -10 deletions)

View changed files

📝 website/Caddyfile (+10 -2)
📝 website/README.md (+5 -2)
📝 website/build.mjs (+65 -6)
➕ website/src/mods-page.js (+66 -0)
➕ website/src/mods.html (+37 -0)
➕ website/src/mods.js (+110 -0)
➕ website/src/mods.test.mjs (+42 -0)
📝 website/src/style.css (+48 -0)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

What

playhorizon.dev/mods: Horizon's registry on the site. A list with a kind filter (mods, modpacks, resource packs, shader packs) and a search, and a page per project: what a mod may do (its capabilities, in the words the game and the launcher use), how to install it (launcher, horizon-launcher mods install --source horizon <id>, or by hand), its file with size and SHA-256, its signing key when it has one, its versions and changelogs, and links to its source, its registry entry and a report form.

  • build.mjs fetches the published index (https://ludovic111.github.io/horizon-mods/index.json, or HORIZON_MOD_INDEX for a local file) and bakes mods.html and mods/<id>.html, so the pages work without JavaScript and are in the sitemap. mods-page.js refreshes the list from the index in the browser and runs the filter and search.
  • An index the site can't read (a newer schema, a fetch that fails) gives an empty list with a submit link; kinds a newer index adds are left out until the site knows them.
  • Caddy: /mods/<id> serves the baked page, an id built later falls back to the list page (which renders it from the fresh index), other paths still 404. CSP allows ludovic111.github.io for images and the index fetch.
  • Until the submission form lands, "Submit yours" links to the registry repository's README.

The index format is docs/api/mod-index.md (#mod-index PR, stacked separately); this PR only reads it.

Checked

  • npm test in website/: 23 pass (4 new: index reading, kind/search matching, list and page HTML, escaping).
  • Built with a local test index (a signed mod, a modpack, an unknown world kind) and served with the Caddyfile: list in dark and light, the coords_hud and modpack pages, an unknown id, a phone width; filter and search driven in Playwright. /nope still 404s.
pr_ready
Check Result
Scope ✅ 8 files, +383 −10
Cargo.lock ✅ unchanged
Public tree ✅
Parity ➖ no harness affected

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/1596 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/24/2026 **Status:** ✅ Merged **Merged:** 10/25/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/website-mods` --- ### 📝 Commits (2) - [`787c3a2`](https://github.com/horizon-rust/horizon/commit/787c3a2f19e52cdbd63069a29a47e1a6507b6d77) Website: /mods, Horizon's registry of mods, modpacks and resource packs - [`65fa108`](https://github.com/horizon-rust/horizon/commit/65fa108cba427c41c039306fd0442c9415d001a3) Merge origin/main into feat/website-mods ### 📊 Changes **8 files changed** (+383 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `website/Caddyfile` (+10 -2) 📝 `website/README.md` (+5 -2) 📝 `website/build.mjs` (+65 -6) ➕ `website/src/mods-page.js` (+66 -0) ➕ `website/src/mods.html` (+37 -0) ➕ `website/src/mods.js` (+110 -0) ➕ `website/src/mods.test.mjs` (+42 -0) 📝 `website/src/style.css` (+48 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What `playhorizon.dev/mods`: Horizon's registry on the site. A list with a kind filter (mods, modpacks, resource packs, shader packs) and a search, and a page per project: what a mod may do (its capabilities, in the words the game and the launcher use), how to install it (launcher, `horizon-launcher mods install --source horizon <id>`, or by hand), its file with size and SHA-256, its signing key when it has one, its versions and changelogs, and links to its source, its registry entry and a report form. - `build.mjs` fetches the published index (`https://ludovic111.github.io/horizon-mods/index.json`, or `HORIZON_MOD_INDEX` for a local file) and bakes `mods.html` and `mods/<id>.html`, so the pages work without JavaScript and are in the sitemap. `mods-page.js` refreshes the list from the index in the browser and runs the filter and search. - An index the site can't read (a newer schema, a fetch that fails) gives an empty list with a submit link; kinds a newer index adds are left out until the site knows them. - Caddy: `/mods/<id>` serves the baked page, an id built later falls back to the list page (which renders it from the fresh index), other paths still 404. CSP allows `ludovic111.github.io` for images and the index fetch. - Until the submission form lands, "Submit yours" links to the registry repository's README. The index format is `docs/api/mod-index.md` (#mod-index PR, stacked separately); this PR only reads it. ## Checked - `npm test` in `website/`: 23 pass (4 new: index reading, kind/search matching, list and page HTML, escaping). - Built with a local test index (a signed mod, a modpack, an unknown `world` kind) and served with the Caddyfile: list in dark and light, the coords_hud and modpack pages, an unknown id, a phone width; filter and search driven in Playwright. `/nope` still 404s. <details><summary>pr_ready</summary> | Check | Result | | --- | --- | | Scope | ✅ 8 files, +383 −10 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Parity | ➖ no harness affected | </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:10:50 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#3619
No description provided.