|
| 1 | +# SourceNine Labs website and documentation |
| 2 | + |
| 3 | +This repository contains the SourceNine Labs public website, the CMAPI 1.0 |
| 4 | +documentation, the generated public API browser, and the SourceNine mod |
| 5 | +catalog. The deployable GitHub Pages site is committed under `public/`. |
| 6 | + |
| 7 | +## Public site structure |
| 8 | + |
| 9 | +- `index.html` — SourceNine Labs home; |
| 10 | +- `projects.html` — software and developer-tool directory; |
| 11 | +- `mods/` — data-driven game mod catalog and release notes; |
| 12 | +- `about.html` — SourceNine Labs overview; |
| 13 | +- `cmapi/` — CMAPI player, developer, API, reference, migration, and maintainer |
| 14 | + documentation; |
| 15 | +- `updates/cmapi.json` — official CMAPI update feed after it is published. |
| 16 | + |
| 17 | +The organization pages and CMAPI docs intentionally share typography and color |
| 18 | +tokens while using different layouts. SourceNine pages are a restrained public |
| 19 | +website; CMAPI pages use a conventional three-column documentation layout. |
| 20 | + |
| 21 | +## Edit content |
| 22 | + |
| 23 | +Authoritative inputs live under `content/`: |
| 24 | + |
| 25 | +- `content/cmapi/` contains the CMAPI Markdown documentation copied from the |
| 26 | + CMAPI repository; |
| 27 | +- `content/api/source/` contains the public C# contracts used to generate API |
| 28 | + signatures and member pages; |
| 29 | +- `content/site-data/mods.json` is the single mod-catalog data source. |
| 30 | + |
| 31 | +Do not edit generated HTML under `public/cmapi/` by hand. Change the Markdown, |
| 32 | +C# XML comments, or catalog JSON and rebuild. |
| 33 | + |
| 34 | +## Rebuild and validate |
| 35 | + |
| 36 | +Requirements: Python 3.11 or later and Pandoc. |
| 37 | + |
| 38 | +```powershell |
| 39 | +python tools/build_site.py |
| 40 | +python tools/validate_site.py |
| 41 | +python tools/build_site.py --check |
| 42 | +``` |
| 43 | + |
| 44 | +The validation pass checks local links and anchors, organization navigation, |
| 45 | +CMAPI version labels, the complete 59-type API surface, 1.0 helper services, |
| 46 | +the search index, and obsolete SourceNine URLs. |
| 47 | + |
| 48 | +To refresh from a local CMAPI repository and rebuild in one command: |
| 49 | + |
| 50 | +```powershell |
| 51 | +python tools/sync_cmapi_content.py "C:\Users\you\source\repos\CMAPI" |
| 52 | +``` |
| 53 | + |
| 54 | +## Preview locally |
| 55 | + |
| 56 | +```powershell |
| 57 | +python -m http.server 8080 --directory public |
| 58 | +``` |
| 59 | + |
| 60 | +Open `http://localhost:8080`. Relative URLs are used throughout so the same |
| 61 | +output works at the GitHub Pages project path. |
| 62 | + |
| 63 | +## Publish to GitHub Pages |
| 64 | + |
| 65 | +The included workflow deploys `public/` on pushes to `main` and can also be run |
| 66 | +manually. In the GitHub repository settings, set Pages → Build and deployment → |
| 67 | +Source to **GitHub Actions**. |
| 68 | + |
| 69 | +The production origin expected by CMAPI is: |
| 70 | + |
| 71 | +```text |
| 72 | +https://sourceninelabs.github.io/CMAPI/ |
| 73 | +``` |
| 74 | + |
| 75 | +See `updates/README.md` before publishing or replacing the live update feed. |
| 76 | + |
| 77 | +## Optional workspace preview |
| 78 | + |
| 79 | +The small Vinext shell under `app/` mirrors the SourceNine homepage for the |
| 80 | +workspace preview environment. GitHub Pages deploys the complete static site |
| 81 | +from `public/`; no server, account, or database is required in production. |
0 commit comments