|
1 | | -# Site |
2 | | - |
3 | | -Static GitHub Pages UI for this catalog. |
4 | | - |
5 | | -## Single source of truth |
6 | | - |
7 | | -`site/build.mjs` scans every `catalog/**/*.md` (except `README.md` / `TEMPLATE.md`), reads YAML frontmatter, and writes `site/dist/data.js` + static assets. |
8 | | - |
9 | | -| You edit | What updates | |
10 | | -| --- | --- | |
11 | | -| `catalog/<category>/<id>.md` | Catalog list, search, filters, counts | |
12 | | -| `site/config.json` → `featured` | Safe starting points table (`id` + `need`) | |
13 | | -| `site/config.json` → `categories` / `guides` | Labels and guide links | |
14 | | -| `site/public/*` | Page chrome / design | |
15 | | -| An entry's body (Notes, Evidence) | Its page at `entry/<id>/` | |
16 | | -| `stacks/<id>.md` | Its page at `stack/<id>/`, the homepage Starter stacks list, and "Used in" on each picked entry | |
17 | | - |
18 | | -## Other exports |
19 | | - |
20 | | -Each deploy also publishes |
21 | | -[`catalog.csv`](https://tmhsdigital.github.io/Free-Game-Dev-Assets/catalog.csv) (one row |
22 | | -per entry: id, name, url, category, licence, SPDX, commercial, attribution, formats, tags, |
23 | | -verified, status, page; list fields are joined with `; `) and an Atom feed, |
24 | | -[`feed.xml`](https://tmhsdigital.github.io/Free-Game-Dev-Assets/feed.xml), of the 40 most |
25 | | -recently verified entries. Entries carry no "added" date, so the feed is keyed on |
26 | | -`verified`, the day the licence was last read from the source. |
27 | | - |
28 | | -## Public JSON |
29 | | - |
30 | | -Every deploy publishes the whole catalog as |
31 | | -[`data.json`](https://tmhsdigital.github.io/Free-Game-Dev-Assets/data.json), for scripts |
32 | | -and tools that want the metadata without scraping the page. The page itself loads |
33 | | -`data.js`, the same payload assigned to `window.__CATALOG__`. |
34 | | - |
35 | | -- Top-level keys: `generatedAt`, `site`, `categories`, `guides`, `featured`, `stats`, |
36 | | - `entries`. |
37 | | -- Each entry carries its frontmatter fields (`id`, `name`, `url`, `category`, |
38 | | - `subcategories`, `license`, `license_spdx` where set, `commercial`, |
39 | | - `attribution_required`, `attribution_string` where set, `formats`, `tags`, `verified`, |
40 | | - `status`, `publisher` where set, and the optional 2D fields), plus `path` (the entry's |
41 | | - file in this repo), `page` (the entry's page, relative to the site root), `summary` (the first paragraph of its body), and two derived sort |
42 | | - fields, `attributionClass` and `licenseRank`. |
43 | | -- It is regenerated from `catalog/` on every push to `main`. Field names are stable; |
44 | | - new optional fields may appear. The licence facts are only as current as each entry's |
45 | | - `verified` date: re-check the source before you ship on one. |
46 | | - |
47 | | -## Entry pages |
48 | | - |
49 | | -`build.mjs` writes `entry/<id>/index.html` for every entry from its frontmatter and |
50 | | -body, using `site/lib/markdown.mjs`. The renderer supports exactly what entries use: |
51 | | -`#` and `##` headings, paragraphs, bullet lists (nesting allowed), bold, `*italic*`, |
52 | | -inline code, links and bare URLs. Underscores are literal. Anything else (tables, |
53 | | -code fences, blockquotes, images, raw HTML, `###`, numbered lists) fails the build |
54 | | -with the file and line, as does a relative link to a file that does not exist. |
55 | | - |
56 | | -The build also writes `llms.txt` (one line per entry) and `llms-full.txt` (with each |
57 | | -entry's Notes) for AI assistants, and checks every generated page before it succeeds. |
58 | | -Tests: `node site/lib/lib.test.mjs`. |
59 | | - |
60 | | -## Starter stacks |
61 | | - |
62 | | -`build.mjs` writes `stack/<id>/index.html` for each file in `stacks/` (the format is in |
63 | | -`stacks/README.md`). The page's "What this stack owes" panel is computed from the picked |
64 | | -entries: credit lines to ship, picks that need no credit, aggregators to check file by |
65 | | -file, and open questions. A stack never states a licence itself. V15 in `checks.mjs` |
66 | | -fails a stack whose pick is missing, deprecated or malformed, or whose why sentence |
67 | | -names a licence; `validate.mjs` and `build.mjs` both run it. |
68 | | - |
69 | | -## Licence freshness |
70 | | - |
71 | | -`build.mjs` writes a one-line summary under the homepage hero and `freshness/index.html` |
72 | | -from each entry's `verified` date, using `site/lib/freshness.mjs`. The buckets are the |
73 | | -cards' own (fresh up to 180 days, aging to 365, stale after). Deprecated entries are |
74 | | -not counted. `pages.yml` also runs every Monday at 06:17 UTC so the ages keep moving |
75 | | -when nothing is pushed; GitHub pauses scheduled workflows in a public repository after |
76 | | -60 days without activity, so a long quiet spell needs a manual run from the Actions tab. |
77 | | - |
78 | | -## Sitemap |
79 | | - |
80 | | -`build.mjs` writes `sitemap.xml` (home, freshness, stacks and every non-deprecated entry) |
81 | | -and links it from the homepage with `<link rel="sitemap">`. The `Sitemap:` line in |
82 | | -`robots.txt` is written too, but crawlers only read robots.txt at a host's root, so |
83 | | -under `/Free-Game-Dev-Assets/` it is never seen. Submit |
84 | | -`https://tmhsdigital.github.io/Free-Game-Dev-Assets/sitemap.xml` once in Google Search |
85 | | -Console and Bing Webmaster Tools; that is the step that gets it read. |
86 | | - |
87 | | -## Link check |
88 | | - |
89 | | -`.github/workflows/links.yml` runs `site/check-links.mjs` every Monday at 07:41 UTC (and |
90 | | -on demand from the Actions tab). It fetches each non-deprecated entry's `url` and opens, |
91 | | -or updates, one issue labelled `correction` titled "Link check: N sources need a look", |
92 | | -listing dead links, sources that moved to another domain or GitHub repository, and |
93 | | -entries verified more than a year ago. Sites that refuse the checker (401, 403, 429) are |
94 | | -listed for a manual look but never open the issue on their own. It edits nothing: a |
95 | | -moved source needs its licence re-read before its entry changes. Run it locally with |
96 | | -`npm run links`. |
97 | | - |
98 | | -## Social preview |
99 | | - |
100 | | -`docs/images/readme/og-card.png` is a 1200x630 screenshot of this site's first screen. |
101 | | -`build.mjs` copies it into `dist` and emits the `og:image` and `twitter:image` tags. |
102 | | -Retake it when the hero changes. |
103 | | - |
104 | | -## Commands |
105 | | - |
106 | | -```bash |
107 | | -npm run check # tests, validate, build: what CI runs |
108 | | -npm run serve # preview site/dist |
109 | | -npm run links # the link check, printed to the terminal |
110 | | -``` |
111 | | - |
112 | | -Deploy: `.github/workflows/pages.yml` (source = GitHub Actions), which first runs |
113 | | -`ci.yml` as a reusable workflow. |
| 1 | +# Site |
| 2 | + |
| 3 | +Static GitHub Pages UI for this catalog. |
| 4 | + |
| 5 | +## Single source of truth |
| 6 | + |
| 7 | +`site/build.mjs` scans every `catalog/**/*.md` (except `README.md` / `TEMPLATE.md`), reads YAML frontmatter, and writes `site/dist/data.js` + static assets. |
| 8 | + |
| 9 | +| You edit | What updates | |
| 10 | +| --- | --- | |
| 11 | +| `catalog/<category>/<id>.md` | Catalog list, search, filters, counts | |
| 12 | +| `site/config.json` → `featured` | Safe starting points table (`id` + `need`) | |
| 13 | +| `site/config.json` → `categories` / `guides` | Labels and guide links | |
| 14 | +| `site/public/*` | Page chrome / design | |
| 15 | +| An entry's body (Notes, Evidence) | Its page at `entry/<id>/` | |
| 16 | +| `stacks/<id>.md` | Its page at `stack/<id>/`, the homepage Starter stacks list, and "Used in" on each picked entry | |
| 17 | + |
| 18 | +## Other exports |
| 19 | + |
| 20 | +Each deploy also publishes |
| 21 | +[`catalog.csv`](https://tmhsdigital.github.io/Free-Game-Dev-Assets/catalog.csv) (one row |
| 22 | +per entry: id, name, url, category, licence, SPDX, commercial, attribution, formats, tags, |
| 23 | +verified, status, page; list fields are joined with `; `) and an Atom feed, |
| 24 | +[`feed.xml`](https://tmhsdigital.github.io/Free-Game-Dev-Assets/feed.xml), of the 40 most |
| 25 | +recently verified entries. Entries carry no "added" date, so the feed is keyed on |
| 26 | +`verified`, the day the licence was last read from the source. |
| 27 | + |
| 28 | +## Public JSON |
| 29 | + |
| 30 | +Every deploy publishes the whole catalog as |
| 31 | +[`data.json`](https://tmhsdigital.github.io/Free-Game-Dev-Assets/data.json), for scripts |
| 32 | +and tools that want the metadata without scraping the page. The page itself loads |
| 33 | +`data.js`, the same payload assigned to `window.__CATALOG__`. |
| 34 | + |
| 35 | +- Top-level keys: `generatedAt`, `site`, `categories`, `guides`, `featured`, `stats`, |
| 36 | + `entries`. |
| 37 | +- Each entry carries its frontmatter fields (`id`, `name`, `url`, `category`, |
| 38 | + `subcategories`, `license`, `license_spdx` where set, `commercial`, |
| 39 | + `attribution_required`, `attribution_string` where set, `formats`, `tags`, `verified`, |
| 40 | + `status`, `publisher` where set, and the optional 2D fields), plus `path` (the entry's |
| 41 | + file in this repo), `page` (the entry's page, relative to the site root), `summary` (the first paragraph of its body), and two derived sort |
| 42 | + fields, `attributionClass` and `licenseRank`. |
| 43 | +- It is regenerated from `catalog/` on every push to `main`. Field names are stable; |
| 44 | + new optional fields may appear. The licence facts are only as current as each entry's |
| 45 | + `verified` date: re-check the source before you ship on one. |
| 46 | + |
| 47 | +## Entry pages |
| 48 | + |
| 49 | +`build.mjs` writes `entry/<id>/index.html` for every entry from its frontmatter and |
| 50 | +body, using `site/lib/markdown.mjs`. The renderer supports exactly what entries use: |
| 51 | +`#` and `##` headings, paragraphs, bullet lists (nesting allowed), bold, `*italic*`, |
| 52 | +inline code, links and bare URLs. Underscores are literal. Anything else (tables, |
| 53 | +code fences, blockquotes, images, raw HTML, `###`, numbered lists) fails the build |
| 54 | +with the file and line, as does a relative link to a file that does not exist. |
| 55 | + |
| 56 | +The build also writes `llms.txt` (one line per entry) and `llms-full.txt` (with each |
| 57 | +entry's Notes) for AI assistants, and checks every generated page before it succeeds. |
| 58 | +Tests: `node site/lib/lib.test.mjs`. |
| 59 | + |
| 60 | +## Starter stacks |
| 61 | + |
| 62 | +`build.mjs` writes `stack/<id>/index.html` for each file in `stacks/` (the format is in |
| 63 | +`stacks/README.md`). The page's "What this stack owes" panel is computed from the picked |
| 64 | +entries: credit lines to ship, picks that need no credit, aggregators to check file by |
| 65 | +file, and open questions. A stack never states a licence itself. V15 in `checks.mjs` |
| 66 | +fails a stack whose pick is missing, deprecated or malformed, or whose why sentence |
| 67 | +names a licence; `validate.mjs` and `build.mjs` both run it. |
| 68 | + |
| 69 | +## Licence freshness |
| 70 | + |
| 71 | +`build.mjs` writes a one-line summary under the homepage hero and `freshness/index.html` |
| 72 | +from each entry's `verified` date, using `site/lib/freshness.mjs`. The buckets are the |
| 73 | +cards' own (fresh up to 180 days, aging to 365, stale after). Deprecated entries are |
| 74 | +not counted. `pages.yml` also runs every Monday at 06:17 UTC so the ages keep moving |
| 75 | +when nothing is pushed; GitHub pauses scheduled workflows in a public repository after |
| 76 | +60 days without activity, so a long quiet spell needs a manual run from the Actions tab. |
| 77 | + |
| 78 | +## Sitemap |
| 79 | + |
| 80 | +`build.mjs` writes `sitemap.xml` (home, freshness, stacks and every non-deprecated entry) |
| 81 | +and links it from the homepage with `<link rel="sitemap">`. The `Sitemap:` line in |
| 82 | +`robots.txt` is written too, but crawlers only read robots.txt at a host's root, so |
| 83 | +under `/Free-Game-Dev-Assets/` it is never seen. Submit |
| 84 | +`https://tmhsdigital.github.io/Free-Game-Dev-Assets/sitemap.xml` once in Google Search |
| 85 | +Console and Bing Webmaster Tools; that is the step that gets it read. |
| 86 | + |
| 87 | +## Link check |
| 88 | + |
| 89 | +`.github/workflows/links.yml` runs `site/check-links.mjs` every Monday at 07:41 UTC (and |
| 90 | +on demand from the Actions tab). It fetches each non-deprecated entry's `url` and opens, |
| 91 | +or updates, one issue labelled `correction` titled "Link check: N sources need a look", |
| 92 | +listing dead links, sources that moved to another domain or GitHub repository, and |
| 93 | +entries verified more than a year ago. Sites that refuse the checker (401, 403, 429) are |
| 94 | +listed for a manual look but never open the issue on their own. It edits nothing: a |
| 95 | +moved source needs its licence re-read before its entry changes. Run it locally with |
| 96 | +`npm run links`. |
| 97 | + |
| 98 | +## Re-verify batch |
| 99 | + |
| 100 | +`.github/workflows/reverify.yml` runs `site/reverify-batch.mjs` on the first of each month |
| 101 | +(and on demand). It picks the live entries whose licence was read longest ago, more than |
| 102 | +150 days, about a tenth of the catalog at a time so every entry comes round in about ten |
| 103 | +months, and opens or updates one issue labelled `help wanted` and `good first issue` |
| 104 | +titled "Re-verify batch YYYY-MM: N entries due a licence re-read", with a checklist that |
| 105 | +names each entry's file, source URL and recorded licence. The selection rule is in |
| 106 | +`site/lib/reverify.mjs` and tested. When nothing is due the month is skipped. Preview it |
| 107 | +with `node site/reverify-batch.mjs`. |
| 108 | + |
| 109 | +## Social preview |
| 110 | + |
| 111 | +`docs/images/readme/og-card.png` is a 1200x630 screenshot of this site's first screen. |
| 112 | +`build.mjs` copies it into `dist` and emits the `og:image` and `twitter:image` tags. |
| 113 | +Retake it when the hero changes. |
| 114 | + |
| 115 | +## Commands |
| 116 | + |
| 117 | +```bash |
| 118 | +npm run check # tests, validate, build: what CI runs |
| 119 | +npm run serve # preview site/dist |
| 120 | +npm run links # the link check, printed to the terminal |
| 121 | +``` |
| 122 | + |
| 123 | +Deploy: `.github/workflows/pages.yml` (source = GitHub Actions), which first runs |
| 124 | +`ci.yml` as a reusable workflow. |
0 commit comments