docs: automated documentation pipeline (per-symbol source → pages)
Some checks failed
docs / build-and-deploy (push) Failing after 38s
Some checks failed
docs / build-and-deploy (push) Failing after 38s
Replace the hardcoded landing page and minimal reference with a generated documentation site driven by a single source of truth. - docs/language/**: one file per symbol (93 keywords/types/builtins/namespace methods/operators/annotations), each with front-matter (id, kind, tokens, sig, tip) + description + a ```ludic example. Seeded by exploding the former inline SECTIONS list; these files are now the source of truth. - docs/site/: site.json (editable hero/features/showcase/messaging, not hardcoded) + snippets/*.ludic (real programs shown on the landing page). - tools/docgen/gen.py: generates index.html, api.html, ludic-highlight.js and symbols.json. The highlighter's symbol tables, hover tips and jump anchors are GENERATED from the per-symbol files — add a symbol and it is recognized, tipped and linked in every snippet automatically. Python stdlib only. - tools/docgen/check.py: verifies the pages contract + that no snippet token links to a missing reference anchor. - .forgejo/workflows/docs.yml: rebuilds and publishes to the pages branch on every push to main touching the docs sources. Consumes the new Screen.*/Color.*/named-arg API and the 221-color palette. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
a3a1e4d160
commit
51ddfa3ce9
121 changed files with 3827 additions and 0 deletions
7
docs/language/builtins/_section.md
Normal file
7
docs/language/builtins/_section.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
id: builtins
|
||||
title: Builtin functions
|
||||
order: 12
|
||||
---
|
||||
|
||||
Global functions available anywhere, beyond the namespaced APIs above.
|
||||
12
docs/language/builtins/fn-abs.md
Normal file
12
docs/language/builtins/fn-abs.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
id: fn-abs
|
||||
name: abs
|
||||
category: builtins
|
||||
kind: builtin
|
||||
tokens: abs
|
||||
sig: abs(a) -> int
|
||||
tip: Absolute value.
|
||||
order: 8
|
||||
---
|
||||
|
||||
Absolute value.
|
||||
12
docs/language/builtins/fn-bytes.md
Normal file
12
docs/language/builtins/fn-bytes.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
id: fn-bytes
|
||||
name: bytes / words
|
||||
category: builtins
|
||||
kind: builtin
|
||||
tokens: bytes words
|
||||
sig: bytes(n) -> ptr / words(n) -> words
|
||||
tip: Allocate a raw buffer of n bytes / n 32-bit words.
|
||||
order: 11
|
||||
---
|
||||
|
||||
Allocate a raw buffer of n bytes / n 32-bit words.
|
||||
12
docs/language/builtins/fn-clamp.md
Normal file
12
docs/language/builtins/fn-clamp.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
id: fn-clamp
|
||||
name: clamp
|
||||
category: builtins
|
||||
kind: builtin
|
||||
tokens: clamp
|
||||
sig: clamp(v, lo, hi) -> int
|
||||
tip: Constrain v to [lo, hi].
|
||||
order: 9
|
||||
---
|
||||
|
||||
Constrain v to [lo, hi].
|
||||
12
docs/language/builtins/fn-font_load.md
Normal file
12
docs/language/builtins/fn-font_load.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
id: fn-font_load
|
||||
name: font_load
|
||||
category: builtins
|
||||
kind: builtin
|
||||
tokens: font_load
|
||||
sig: font_load(path) -> int
|
||||
tip: Load a TrueType font and return a handle for the UI.
|
||||
order: 12
|
||||
---
|
||||
|
||||
Load a TrueType font and return a handle for the UI.
|
||||
12
docs/language/builtins/fn-fx.md
Normal file
12
docs/language/builtins/fn-fx.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
id: fn-fx
|
||||
name: fx / flr
|
||||
category: builtins
|
||||
kind: builtin
|
||||
tokens: fx flr
|
||||
sig: fx(n) -> fixed / flr(x) -> int
|
||||
tip: Convert between int and fixed-point.
|
||||
order: 10
|
||||
---
|
||||
|
||||
Convert between int and fixed-point.
|
||||
12
docs/language/builtins/fn-len.md
Normal file
12
docs/language/builtins/fn-len.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
id: fn-len
|
||||
name: len
|
||||
category: builtins
|
||||
kind: builtin
|
||||
tokens: len
|
||||
sig: len(x) -> int
|
||||
tip: Length of a slice or string.
|
||||
order: 5
|
||||
---
|
||||
|
||||
Length of a slice or string.
|
||||
12
docs/language/builtins/fn-load.md
Normal file
12
docs/language/builtins/fn-load.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
id: fn-load
|
||||
name: load
|
||||
category: builtins
|
||||
kind: builtin
|
||||
tokens: load
|
||||
sig: load() -> bool
|
||||
tip: Restore a snapshot written by save().
|
||||
order: 4
|
||||
---
|
||||
|
||||
Restore a snapshot written by <code>save()</code>.
|
||||
12
docs/language/builtins/fn-min.md
Normal file
12
docs/language/builtins/fn-min.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
id: fn-min
|
||||
name: min / max
|
||||
category: builtins
|
||||
kind: builtin
|
||||
tokens: min max
|
||||
sig: min(a, b) / max(a, b) -> int
|
||||
tip: The smaller / larger of two ints.
|
||||
order: 7
|
||||
---
|
||||
|
||||
The smaller / larger of two ints.
|
||||
12
docs/language/builtins/fn-print.md
Normal file
12
docs/language/builtins/fn-print.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
id: fn-print
|
||||
name: print
|
||||
category: builtins
|
||||
kind: builtin
|
||||
tokens: print
|
||||
sig: print(x)
|
||||
tip: Print an int or string, followed by a newline — for headless tests and debugging.
|
||||
order: 0
|
||||
---
|
||||
|
||||
Print an int or string, followed by a newline — for headless tests and debugging.
|
||||
12
docs/language/builtins/fn-push.md
Normal file
12
docs/language/builtins/fn-push.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
id: fn-push
|
||||
name: push
|
||||
category: builtins
|
||||
kind: builtin
|
||||
tokens: push
|
||||
sig: push(slice, x)
|
||||
tip: Append to a slice.
|
||||
order: 6
|
||||
---
|
||||
|
||||
Append to a slice.
|
||||
12
docs/language/builtins/fn-quit.md
Normal file
12
docs/language/builtins/fn-quit.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
id: fn-quit
|
||||
name: quit
|
||||
category: builtins
|
||||
kind: builtin
|
||||
tokens: quit
|
||||
sig: quit()
|
||||
tip: Stop the game loop after this frame.
|
||||
order: 2
|
||||
---
|
||||
|
||||
Stop the game loop after this frame.
|
||||
12
docs/language/builtins/fn-save.md
Normal file
12
docs/language/builtins/fn-save.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
id: fn-save
|
||||
name: save
|
||||
category: builtins
|
||||
kind: builtin
|
||||
tokens: save
|
||||
sig: save()
|
||||
tip: Serialize the entire world — every entity, property and program var — to a snapshot in one call.
|
||||
order: 3
|
||||
---
|
||||
|
||||
Serialize the entire world — every entity, property and program <code>var</code> — to a snapshot in one call.
|
||||
12
docs/language/builtins/fn-str.md
Normal file
12
docs/language/builtins/fn-str.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
id: fn-str
|
||||
name: str
|
||||
category: builtins
|
||||
kind: builtin
|
||||
tokens: str
|
||||
sig: str(x) -> str
|
||||
tip: Convert an int/bool/fixed to text; a string passes through.
|
||||
order: 1
|
||||
---
|
||||
|
||||
Convert an int/bool/fixed to text; a string passes through. Also used by <code>`{…}`</code> interpolation.
|
||||
Loading…
Add table
Add a link
Reference in a new issue