mirror of
https://github.com/Such-Software/adaptive-multi-protocol-gateway.git
synced 2026-10-17 15:41:41 +02:00
Add Gemini renderer and semantic audit
This commit is contained in:
@@ -32,6 +32,17 @@ source site
|
||||
: Reads the built output of another static site generator. AMPG does not own that
|
||||
generator; it adapts the generated files.
|
||||
|
||||
## Source quality
|
||||
|
||||
AMPG gets better results from semantic, accessible source documents. Authors should use
|
||||
one `h1`, ordered heading levels, meaningful link text, alt text for images, and ordinary
|
||||
flowing document structure before decorative layout. This keeps clearnet accessible and
|
||||
gives constrained renderers a clean outline for Gemtext, Micron, and other text-first
|
||||
targets.
|
||||
|
||||
`ampg audit` reports source-quality warnings. The audit is advisory by default and can be
|
||||
made strict in CI with `--fail-on-warn`.
|
||||
|
||||
## Content graph
|
||||
|
||||
The internal graph is intentionally small:
|
||||
|
||||
@@ -59,11 +59,12 @@ max_asset_bytes = 1048576
|
||||
script_policy = "strip"
|
||||
|
||||
[site.protocols.gemini]
|
||||
enabled = false
|
||||
enabled = true
|
||||
renderer = "gemtext"
|
||||
daemon = "agate"
|
||||
daemon_policy = "auto"
|
||||
port = 1965
|
||||
max_asset_bytes = 1048576
|
||||
|
||||
[site.protocols.reticulum]
|
||||
enabled = false
|
||||
@@ -103,6 +104,8 @@ workflow.
|
||||
- one `.gmi` page per HTML or Markdown page.
|
||||
- inline links emitted after the paragraph that referenced them.
|
||||
- images and PDFs emitted as links with file size metadata when known.
|
||||
- local `.html` links rewritten to `.gmi`.
|
||||
- JavaScript, CSS, source maps, and oversized assets skipped.
|
||||
|
||||
`micron` defaults:
|
||||
|
||||
@@ -216,6 +219,7 @@ Generated snippets are not installed by `plan`:
|
||||
- nginx server blocks for static HTTP roots.
|
||||
- Tor hidden-service snippets for loopback HTTP targets.
|
||||
- i2pd server tunnel snippets for I2P web publishing.
|
||||
- Agate plan values for Gemini publishing.
|
||||
|
||||
I2P web tunnels should use a web-specific key file such as `wownero-web.dat`; AMPG does
|
||||
not reuse daemon RPC/P2P tunnel keys for web publishing.
|
||||
|
||||
@@ -65,7 +65,7 @@ and include backup warnings in the plan.
|
||||
Default daemon: Agate.
|
||||
|
||||
Gemini is static-friendly and can be managed safely. AMPG generates `.gmi` output,
|
||||
certificates when requested, and an Agate config pointing at the Gemini output root.
|
||||
certificates when requested, and Agate plan values pointing at the Gemini output root.
|
||||
|
||||
### Reticulum
|
||||
|
||||
|
||||
@@ -34,3 +34,13 @@ Notes:
|
||||
Notes:
|
||||
- Web tunnels should use web-specific key files.
|
||||
- Existing RPC/P2P tunnel keys are not reused for web publishing.
|
||||
|
||||
## agate
|
||||
|
||||
- Protocols: gemini
|
||||
- Default policy: `auto`
|
||||
- Generated artifacts: Agate plan values
|
||||
|
||||
Notes:
|
||||
- Gemini serves generated Gemtext output directly.
|
||||
- Certificate and key paths are plan values until install/apply support exists.
|
||||
|
||||
@@ -29,3 +29,16 @@ Defaults:
|
||||
- Skips JavaScript and source-map files.
|
||||
- Skips oversized assets above max_asset_bytes.
|
||||
- Removes remote src/poster/link asset references.
|
||||
|
||||
## gemtext
|
||||
|
||||
Text-first Gemini output from semantic HTML.
|
||||
|
||||
- Output: Gemtext plus linked/downloadable assets
|
||||
|
||||
Defaults:
|
||||
- Converts HTML headings to Gemtext heading lines.
|
||||
- Converts paragraphs and list items to flowing text.
|
||||
- Converts anchors and images to Gemtext link lines.
|
||||
- Rewrites local .html links to .gmi links.
|
||||
- Skips JavaScript, CSS, source maps, and oversized assets.
|
||||
|
||||
@@ -122,7 +122,7 @@ daemon_policy = "auto"
|
||||
## Acceptance Criteria
|
||||
|
||||
- `ampg plan` identifies the Wownero source tree and selected protocols.
|
||||
- `ampg build` creates clearnet and Tor output without requiring Markdown.
|
||||
- `ampg build` creates clearnet, Tor, I2P, and Gemini output without requiring Markdown.
|
||||
- Tor output contains no `<script>` tags or inline event handlers.
|
||||
- Generated Gemini output has readable headings, paragraphs, and links.
|
||||
- Generated Micron output fits terminal-first browsing.
|
||||
|
||||
Reference in New Issue
Block a user