Skip to content

Commit 17325b8

Browse files
committed
refactor(): migrate to domstack
1 parent 74ba16d commit 17325b8

1,369 files changed

Lines changed: 146737 additions & 246370 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docs-audit.yml

Lines changed: 20 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -3,83 +3,33 @@ name: Docs Audit
33
on:
44
pull_request:
55
push:
6-
branches:
7-
- main
8-
- master
6+
branches: [main, master]
97
workflow_dispatch:
108

9+
permissions:
10+
contents: read
11+
1112
jobs:
1213
docs-audit:
1314
runs-on: ubuntu-latest
14-
1515
steps:
16-
- name: Check out repository
17-
uses: actions/checkout@v4
18-
19-
- name: Set up Python
20-
uses: actions/setup-python@v5
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-node@v4
2118
with:
22-
python-version: "3.12"
23-
24-
- name: Set up Node.js
25-
uses: actions/setup-node@v4
19+
node-version: '24'
20+
cache: npm
21+
- uses: actions/setup-python@v5
2622
with:
27-
node-version: "20"
28-
29-
- name: Rebuild generated docs artifacts
30-
run: |
31-
python3 runtime/tools/build-indexes.py
32-
python3 runtime/tools/build-llms-txt.py
33-
34-
python3 sage/tools/build-indexes.py
35-
python3 sage/tools/build-llms-txt.py
36-
37-
python3 slg/tools/build-indexes.py
38-
python3 slg/tools/build-llms-txt.py
39-
40-
python3 virtnosis/tools/build-indexes.py
41-
python3 virtnosis/tools/build-llms-txt.py
42-
43-
python3 silk/tools/build-indexes.py
44-
python3 silk/tools/build-llms-txt.py
45-
46-
- name: Run docs audits
47-
run: |
48-
python3 runtime/tools/audit-site.py
49-
python3 sage/tools/audit-site.py
50-
python3 slg/tools/audit-site.py
51-
python3 virtnosis/tools/audit-site.py
52-
python3 silk/tools/audit-site.py
53-
python3 silk/tools/audit-stdlib-docs.py
54-
55-
- name: Run static checks
23+
python-version: '3.12'
24+
- run: npm ci
25+
- run: npx playwright install --with-deps chromium
26+
- run: npm run check
27+
- name: Verify source files remain unchanged
5628
run: |
57-
python3 -m py_compile runtime/tools/*.py
58-
python3 -m py_compile sage/tools/*.py
59-
python3 -m py_compile slg/tools/*.py
60-
python3 -m py_compile virtnosis/tools/*.py
61-
python3 -m py_compile silk/tools/*.py
62-
63-
node --check assets/docs-viewer.js
64-
node --check assets/spec-viewer.js
65-
node --check assets/site.js
66-
6729
git diff --check
68-
git diff --exit-code -- \
69-
runtime/docs/index.json \
70-
runtime/docs/search.json \
71-
runtime/llms.txt \
72-
sage/docs/index.json \
73-
sage/docs/search.json \
74-
sage/llms.txt \
75-
slg/docs/index.json \
76-
slg/docs/search.json \
77-
slg/llms.txt \
78-
virtnosis/docs/index.json \
79-
virtnosis/docs/search.json \
80-
virtnosis/llms.txt \
81-
silk/docs/index.json \
82-
silk/docs/search.json \
83-
silk/wiki/index.json \
84-
silk/wiki/search.json \
85-
silk/llms.txt
30+
git diff --exit-code
31+
- uses: actions/upload-artifact@v4
32+
if: failure()
33+
with:
34+
name: browser-test-results
35+
path: test-results/

.github/workflows/pages.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Deploy GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: pages
13+
cancel-in-progress: false
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: '24'
23+
cache: npm
24+
- uses: actions/setup-python@v5
25+
with:
26+
python-version: '3.12'
27+
- run: npm ci
28+
# Upstream ingestion is manual. Validate only the committed public sources.
29+
- run: npx playwright install --with-deps chromium
30+
- run: npm run check
31+
- uses: actions/upload-pages-artifact@v3
32+
with:
33+
path: public
34+
deploy:
35+
needs: build
36+
runs-on: ubuntu-latest
37+
permissions:
38+
pages: write
39+
id-token: write
40+
environment:
41+
name: github-pages
42+
url: ${{ steps.deployment.outputs.page_url }}
43+
steps:
44+
- name: Deploy
45+
id: deployment
46+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,11 @@
22
_site
33
.code
44
.codex
5+
6+
node_modules/
7+
public/
8+
public-next/
9+
test-results/
10+
playwright-report/
11+
__pycache__/
12+
*.pyc

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24

README.md

Lines changed: 116 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,129 @@
11
# Oro Website
22

3-
This directory contains the static website for Oro Computer, including landing pages and documentation for:
3+
Oro Computer's static website uses DOMStack to build marketing pages, learning
4+
chapters, and documentation for Runtime, Silk, Virtnosis, Sage, and slg.
45

5-
- **Oro Runtime** (`website/runtime/`)
6-
- **Silk** (`website/silk/`)
7-
- **Virtnosis** (`website/virtnosis/`)
6+
## Local development
87

9-
The public top-level navigation is intentionally small:
8+
Use Node 24 and Python 3.12. No sibling checkout is needed to build the site.
109

11-
- **Technology** (`website/index.html`) presents Oro Runtime, Silk, and Virtnosis.
12-
- **Blog** (`website/blog/`) is a static placeholder for future engineering notes.
13-
- **Docs** (`website/docs/`) routes readers into Runtime and Silk documentation.
14-
15-
Legacy Sage and slg pages remain in the repository for continuity, but they are
16-
not promoted from the top-level navigation or docs hub.
17-
18-
## Runtime docs
19-
20-
Runtime docs use the same docs viewer UX as Silk docs (sidebar, search, prev/next, deep links).
21-
22-
- Viewer: `website/runtime/docs/index.html`
23-
- Markdown sources: `website/runtime/docs/source/`
24-
- Generated indexes:
25-
- `website/runtime/docs/index.json`
26-
- `website/runtime/docs/search.json`
27-
- LLM pack: `website/runtime/llms.txt`
28-
29-
Rebuild generated files after changing sources:
30-
31-
```bash
32-
python3 website/runtime/tools/build-indexes.py
33-
python3 website/runtime/tools/build-llms-txt.py
34-
```
35-
36-
## Silk docs
37-
38-
- Docs viewer: `website/silk/docs/index.html`
39-
- Wiki viewer: `website/silk/wiki/index.html`
40-
- Generators live in `website/silk/tools/`.
41-
42-
Rebuild generated files:
43-
44-
```bash
45-
python3 website/silk/tools/build-indexes.py
46-
python3 website/silk/tools/build-llms-txt.py
10+
```sh
11+
npm ci
12+
npm run dev
4713
```
4814

49-
To refresh the website copy from the sibling Silk compiler checkout:
50-
51-
```bash
52-
python3 website/silk/tools/sync-from-silk-docs.py
53-
python3 website/silk/tools/build-indexes.py
54-
python3 website/silk/tools/build-llms-txt.py
55-
python3 website/silk/tools/audit-site.py
56-
python3 website/silk/tools/audit-stdlib-docs.py
15+
`npm run build` creates `public/` from scratch. `npm run preview` builds and serves
16+
that same artifact. Generated HTML, search indexes, raw Markdown, and LLM packs
17+
are output files; do not commit `public/`.
18+
19+
## Editing content
20+
21+
- `src/**/page.html`: authored page fragments, with metadata in `page.vars.ts`.
22+
- `src/**/page.md`: public documentation, including YAML frontmatter.
23+
- `src/layouts/`: shared page chrome, navigation, and progressive browser clients.
24+
- `src/globals/global.css`: Oro styles, based on `docs/branding/`.
25+
- `src/lib/`: rendering, URL, collection, and navigation helpers.
26+
- `src/global.data.ts`: collection data derived from source pages.
27+
- `src/artifacts.template.ts`: navigation/search JSON, raw Markdown, LLM packs,
28+
and sitemap output.
29+
30+
Consult `docs/branding/` before changing visual design or copy tone. The approved
31+
logo originals remain in `docs/branding/assets/`; their checked mirrors in `src/docs/branding/assets/` retain
32+
the same public URLs. Update both when replacing an asset. Handlebars is disabled globally so literal `{{ ... }}` code
33+
examples remain intact.
34+
35+
Each documentation page declares `title`, `description`, `docsCollection`,
36+
`section`, `order`, `sourcePath`, `githubRepo`, and `githubRef`. Preserve
37+
`sourcePath`: it defines the stable raw Markdown endpoint and import identity.
38+
The `start` document lives at its collection root; the specification lives at
39+
`src/silk/spec/2026/page.md`. Order is explicit and does not depend on filenames.
40+
New imported pages are appended; review their section and order after syncing.
41+
42+
Use canonical directory links such as `/runtime/docs/guides/hello-world/`.
43+
Collection roots redirect legacy `?p=` links while preserving fragments. Static
44+
redirect pages retain Silk's old logger-guide and specification aliases. The
45+
articles, sidebar, previous/next navigation, and ToC work without JavaScript;
46+
search, tabs, copy controls, and Ask AI progressively enhance them.
47+
48+
## Refreshing upstream content
49+
50+
Ingestion is separate from building and CI. These commands read explicit upstream
51+
checkouts, preserve the established curated/website-owned content, and write
52+
committed DOMStack Markdown pages. Review and commit their changes before deploying.
53+
54+
```sh
55+
python3 silk/tools/sync-from-silk-docs.py --silk-repo /path/to/silk
56+
python3 runtime/tools/generate-js-api-reference.py --runtime-repo /path/to/runtime
57+
npm run build
58+
npm run audit
59+
npm run audit:content
5760
```
5861

59-
## Virtnosis docs
60-
61-
- Docs viewer: `website/virtnosis/docs/index.html`
62-
- Markdown sources: `website/virtnosis/docs/source/`
63-
64-
Rebuild generated files:
65-
66-
```bash
67-
python3 website/virtnosis/tools/build-indexes.py
68-
python3 website/virtnosis/tools/build-llms-txt.py
62+
The defaults use adjacent `silk` and `runtime` directories, independent of the
63+
website checkout's name. Silk's legacy `--repo-root` workspace option is retained.
64+
The tools stage flat Markdown temporarily, apply the existing ownership and
65+
pruning rules, then import it through `tools/import-public.ts`. Public-copy
66+
normalization runs during ingestion, never during rendering; fenced examples
67+
are preserved. Unchanged staged pages keep their exact Markdown and metadata;
68+
linked API headings become plain-text titles when a page changes. The reference
69+
catalog includes new pages in the same import batch. Runtime's generated
70+
reference markers retain surrounding prose.
71+
72+
The Python index and LLM exporters have been replaced by DOMStack templates.
73+
Content audits inspect `public/` by default; set `ORO_SITE_OUTPUT` to inspect
74+
another output directory. Set `ORO_RUNTIME_REPO` explicitly to additionally audit
75+
against a particular upstream Runtime checkout; ordinary checks are independent
76+
of whatever happens to be checked out next door.
77+
78+
## Validation
79+
80+
Install the browser once, then run the same complete gate used by both CI and
81+
Pages deployment:
82+
83+
```sh
84+
npx playwright install chromium
85+
npm run check
6986
```
7087

71-
## slg docs
72-
73-
- Docs viewer: `website/slg/docs/index.html`
74-
- Markdown sources: `website/slg/docs/source/`
75-
76-
Rebuild generated files:
77-
78-
```bash
79-
python3 website/slg/tools/build-indexes.py
80-
python3 website/slg/tools/build-llms-txt.py
88+
Individual checks are also available:
89+
90+
```sh
91+
npm run typecheck
92+
npm test
93+
npm run build
94+
npm run audit
95+
npm run audit:content
96+
npm run test:site
97+
npx playwright install chromium
98+
npm run test:browser
99+
npm run test:tooling
100+
npm run test:reproducibility
81101
```
82102

83-
## Shared docs viewer
84-
85-
Runtime, Silk, Virtnosis, Sage, and slg use the shared docs viewer:
86-
87-
- `website/assets/docs-viewer.js`
103+
The crawler checks every generated internal link and fragment. Site tests cover
104+
all original 27 HTML routes and 585 documentation routes, raw-source parity,
105+
search text, and LLM packs. Browser tests cover desktop/mobile layouts,
106+
no-JavaScript rendering, compatibility redirects, search, tabs, copy controls,
107+
Ask AI, specification heading search, and fragments inside tabs. Tooling tests
108+
verify all 585 pages survive unchanged imports and that a renamed standalone
109+
checkout rebuilds articles and exports during development. To use an existing Chromium install,
110+
set `ORO_BROWSER_EXECUTABLE` to its executable path.
111+
112+
`tools/migration/migrate.ts /path/to/legacy-checkout` records the original route
113+
inventory and performs the deterministic initial conversion. It is a migration
114+
utility, not a routine content refresh command. Keep `tools/migration/baseline.json`
115+
as the compatibility fixture. See [migration status and cutover](docs/migration.md). When intentionally retiring or adding routes,
116+
update the relevant assertions and redirects together.
117+
118+
## Deployment and dependency updates
119+
120+
GitHub Actions builds and uploads `public/` and deploys with the Pages environment.
121+
The repository's **Settings → Pages → Source** must be **GitHub Actions**. Merging
122+
these changes does not itself change that repository setting. The output contains
123+
`CNAME`, `.nojekyll`, branding assets, raw Markdown, and `llms.txt` packs.
124+
125+
DOMStack uses the **beta** distribution tag in `package.json`. The committed
126+
lockfile records the resolved version, and CI uses `npm ci` for reproducible
127+
installs. To refresh to the current beta, run `npm update @domstack/static`,
128+
commit the updated lockfile, run the complete validation sequence, and compare
129+
representative desktop and mobile screenshots.

_config.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)