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/screen/_section.md
Normal file
7
docs/language/screen/_section.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
id: screen
|
||||
title: Screen — drawing
|
||||
order: 5
|
||||
---
|
||||
|
||||
The 2D drawing surface. Every call takes named arguments; draw during the <code>Render</code> phase, then <code>Screen.show()</code>.
|
||||
16
docs/language/screen/screen-clear.md
Normal file
16
docs/language/screen/screen-clear.md
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
id: screen-clear
|
||||
name: Screen.clear
|
||||
category: screen
|
||||
kind: namespace-method
|
||||
tokens: Screen.clear
|
||||
sig: Screen.clear(color)
|
||||
tip: Fill the entire screen with one color.
|
||||
order: 0
|
||||
---
|
||||
|
||||
Fill the entire screen with one color.
|
||||
|
||||
```ludic
|
||||
Screen.clear(Color.MidnightBlue)
|
||||
```
|
||||
16
docs/language/screen/screen-draw_number.md
Normal file
16
docs/language/screen/screen-draw_number.md
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
id: screen-draw_number
|
||||
name: Screen.draw_number
|
||||
category: screen
|
||||
kind: namespace-method
|
||||
tokens: Screen.draw_number
|
||||
sig: Screen.draw_number(x, y, value, color, scale)
|
||||
tip: Draw an integer — no allocation, no string conversion.
|
||||
order: 5
|
||||
---
|
||||
|
||||
Draw an integer — no allocation, no string conversion.
|
||||
|
||||
```ludic
|
||||
Screen.draw_number(x: 52, y: 4, value: score, color: Color.Gold, scale: 1)
|
||||
```
|
||||
12
docs/language/screen/screen-draw_rectangle.md
Normal file
12
docs/language/screen/screen-draw_rectangle.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
id: screen-draw_rectangle
|
||||
name: Screen.draw_rectangle
|
||||
category: screen
|
||||
kind: namespace-method
|
||||
tokens: Screen.draw_rectangle
|
||||
sig: Screen.draw_rectangle(x, y, width, height, color)
|
||||
tip: Draw a one-pixel rectangle outline.
|
||||
order: 2
|
||||
---
|
||||
|
||||
Draw a one-pixel rectangle outline.
|
||||
16
docs/language/screen/screen-draw_text.md
Normal file
16
docs/language/screen/screen-draw_text.md
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
id: screen-draw_text
|
||||
name: Screen.draw_text
|
||||
category: screen
|
||||
kind: namespace-method
|
||||
tokens: Screen.draw_text
|
||||
sig: Screen.draw_text(x, y, text, color, scale)
|
||||
tip: Draw a string with the built-in font at an integer scale.
|
||||
order: 4
|
||||
---
|
||||
|
||||
Draw a string with the built-in font at an integer scale.
|
||||
|
||||
```ludic
|
||||
Screen.draw_text(x: 6, y: 4, text: "SCORE", color: Color.White, scale: 1)
|
||||
```
|
||||
16
docs/language/screen/screen-fill_rectangle.md
Normal file
16
docs/language/screen/screen-fill_rectangle.md
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
id: screen-fill_rectangle
|
||||
name: Screen.fill_rectangle
|
||||
category: screen
|
||||
kind: namespace-method
|
||||
tokens: Screen.fill_rectangle
|
||||
sig: Screen.fill_rectangle(x, y, width, height, color)
|
||||
tip: Draw a filled rectangle.
|
||||
order: 1
|
||||
---
|
||||
|
||||
Draw a filled rectangle.
|
||||
|
||||
```ludic
|
||||
Screen.fill_rectangle(x: 8, y: 8, width: 16, height: 16, color: Color.Crimson)
|
||||
```
|
||||
12
docs/language/screen/screen-height.md
Normal file
12
docs/language/screen/screen-height.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
id: screen-height
|
||||
name: Screen.height
|
||||
category: screen
|
||||
kind: namespace-method
|
||||
tokens: Screen.height
|
||||
sig: Screen.height() -> int
|
||||
tip: Framebuffer height in pixels.
|
||||
order: 8
|
||||
---
|
||||
|
||||
Framebuffer height in pixels.
|
||||
12
docs/language/screen/screen-put_pixel.md
Normal file
12
docs/language/screen/screen-put_pixel.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
id: screen-put_pixel
|
||||
name: Screen.put_pixel
|
||||
category: screen
|
||||
kind: namespace-method
|
||||
tokens: Screen.put_pixel
|
||||
sig: Screen.put_pixel(x, y, color)
|
||||
tip: Set a single pixel.
|
||||
order: 3
|
||||
---
|
||||
|
||||
Set a single pixel.
|
||||
16
docs/language/screen/screen-show.md
Normal file
16
docs/language/screen/screen-show.md
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
id: screen-show
|
||||
name: Screen.show
|
||||
category: screen
|
||||
kind: namespace-method
|
||||
tokens: Screen.show
|
||||
sig: Screen.show()
|
||||
tip: Present the finished frame — copy everything you have drawn to the window.
|
||||
order: 6
|
||||
---
|
||||
|
||||
Present the finished frame — copy everything you have drawn to the window. Call it once, last, in your Render handler.
|
||||
|
||||
```ludic
|
||||
Screen.show()
|
||||
```
|
||||
12
docs/language/screen/screen-status.md
Normal file
12
docs/language/screen/screen-status.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
id: screen-status
|
||||
name: Screen.status
|
||||
category: screen
|
||||
kind: namespace-method
|
||||
tokens: Screen.status
|
||||
sig: Screen.status(text)
|
||||
tip: Set the persistent one-line status/HUD string.
|
||||
order: 9
|
||||
---
|
||||
|
||||
Set the persistent one-line status/HUD string.
|
||||
12
docs/language/screen/screen-width.md
Normal file
12
docs/language/screen/screen-width.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
id: screen-width
|
||||
name: Screen.width
|
||||
category: screen
|
||||
kind: namespace-method
|
||||
tokens: Screen.width
|
||||
sig: Screen.width() -> int
|
||||
tip: Framebuffer width in pixels.
|
||||
order: 7
|
||||
---
|
||||
|
||||
Framebuffer width in pixels.
|
||||
Loading…
Add table
Add a link
Reference in a new issue