Host on Gitea: forge.yaml, Gitea workflows, host-neutral links
- forge.yaml: the repository's host (Gitea at git.kenschiano.net, limited visibility); the "Report a run" collector, the page's links (data/public/links.json, filled in by site/build.js) and the dataset metadata read it - collection/etl/forge.py: issues, pull requests (merge when checks succeed) and labels for Gitea and GitHub; `python -m collection forge ...` - .gitea/workflows: CI and the daily update (pushes a branch, opens a pull request that merges itself, opens an issue when a source breaks); .github/workflows kept for GitHub - docs: Gitea setup (REPO_SETTINGS), the bot reading atlas files from the repository Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
8713ccff1a
commit
614bfcda7c
+4
-1
@@ -16,7 +16,10 @@ for (const f of fs.readdirSync(path.join(root, "site/atlas"))) copy(`site/atlas/
|
||||
// local serving, give it its own doctype, charset and viewport.
|
||||
{
|
||||
const p = path.join(out, "index.html");
|
||||
const html = fs.readFileSync(p, "utf8");
|
||||
// links from forge.yaml (data/public/links.json, written by `python -m collection build`)
|
||||
const links = JSON.parse(fs.readFileSync(path.join(root, "data/public/links.json"), "utf8"));
|
||||
const html = fs.readFileSync(p, "utf8").replace(/\{\{(\w+)\}\}/g, (m, k) => (k in links ? links[k] : m));
|
||||
fs.writeFileSync(p, html);
|
||||
if (!/^\s*<!doctype/i.test(html))
|
||||
fs.writeFileSync(p, `<!doctype html>\n<meta charset="utf-8">\n<meta name="viewport" content="width=device-width, initial-scale=1">\n${html}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user