asw-v01: archive deferred content (packs, site, lab, legacy examples)

- 2.1: packs/ -> archive/packs/
- 2.2: site/ -> archive/site/
- 2.3: src/lab/ -> archive/lab/
- 2.4: examples/ -> archive/examples-legacy/ (SSI-based)
This commit is contained in:
exe.dev user 2026-06-07 10:39:21 +02:00
parent 416fe2f180
commit e47a9f4401
173 changed files with 11 additions and 5 deletions

View file

@ -0,0 +1,105 @@
---
title: "ASW Pandoc Pack"
description: "Convert markdown to ASW-styled HTML with one command"
layout: prose
---
# ASW Pandoc Pack
Converts GFM markdown to fully ASW-styled HTML. Write markdown natively; the pack renders it with correct `data-attribute` semantics.
## Usage
```bash
pandoc input.md \
--from gfm \
--lua-filter packs/pandoc/asw.lua \
--template packs/pandoc/asw.html5 \
-o output.html
```
## What it does
### Semantic mapping (asw.lua)
| Markdown | Output HTML |
|---|---|
| `- [ ] task` | `<li data-task="todo">task</li>` |
| `- [x] done` | `<li data-task="done">done</li>` |
| `> [!NOTE]` | `<div data-callout="note">` |
| `> [!WARNING]` | `<div data-callout="warning">` |
| `> [!TIP]` | `<div data-callout="tip">` |
| `> [!ERROR]` | `<div data-callout="error">` |
| `[[target]]` | `<a data-wikilink href="#target">target</a>` |
| `[[target\|label]]` | `<a data-wikilink href="#target">label</a>` |
Callout aliases: `[!CAUTION]` → warning, `[!IMPORTANT]`/`[!INFO]` → note, `[!DANGER]` → error.
Wikilinks: punctuation attached to `]]` is preserved outside the link element. Unresolved link detection is not automatic — the href slug is always generated; resolution is a build-time concern.
### Frontmatter → data-attributes (asw.html5)
YAML frontmatter keys map to page-level ASW properties:
```yaml
---
title: "Session Report — 2026-04-02"
description: "Summary of what happened"
layout: prose # → data-layout on <main> (default: prose)
status: done # → data-status on <main> and in header badge
date: 2026-04-02 # → <time datetime="...">
section: "Sessions" # → <p data-text="eyebrow"> above <h1>
tags:
- session
- autonomous
# Session metadata (if agent-authored):
agent: vigilio
model: claude-sonnet-4-6
mode: autonomous # → <span data-mode="autonomous">
session: 10
---
```
Keys not set are simply omitted — no empty elements in the output.
## Layout values
The `layout` key maps directly to `data-layout` on `<main>`:
| Value | Use case |
|---|---|
| `prose` (default) | Articles, notes, documentation |
| `docs` | Two-column docs layout |
| `fluid` | Full-width, no max-width |
Any `data-layout` value supported by `asw.css` works here.
## Status values
| Value | Meaning |
|---|---|
| `done` | Complete |
| `awake` | Active agent/session |
| `sleeping` | Inactive |
| `blocked` | Waiting on dependency |
## CSS dependency
The pack generates HTML that requires `asw.css` for styling. The template links `/asw.css` by default. Override with `--variable css=/path/to/asw.css`.
## Relationship to the build pipeline
`build.sh` uses this pack (via the `doc.html` template) for `content/``docs/` compilation. The standalone pack is also useful for:
- Rendering vault notes as public pages
- One-off markdown → ASW HTML conversion
- Integration into other build systems (trentuna-web, agent pipelines)
## Files
```
packs/pandoc/
├── asw.html5 pandoc HTML5 template — page structure, frontmatter vars
├── asw.lua Lua filter — task lists, callouts, wikilinks
└── README.md this file
```