Release 2.7.0: executable handbooks and native user-site workflows

This commit is contained in:
cflmy committed 2026-11-10 17:03:06 +08:00
1 parent aa0c4d0f55
commit d9aef957f7
562 files changed
+21064 -20387

No files matched your search

+24 -19
View File
@@ -1,27 +1,32 @@
# examples/web-site
# web-site
Canonical **English** sample for `ext/web` — WWW Demo walkthrough site.
This is the complete English document-native site: Home, About, New, the gated custom desk and slug detail each declare their own route. Parents compose structure and leaves contain Markdown. The original ink/wine/gold theme, typography, particles, breakpoints and form states remain declarative, with no author business JavaScript or hand-written CSS.
**Hands-on script:** [DEMO.md](./DEMO.md)
From the checkout root, use the current source CLI and prepare the engineering and Web plugins, then call the actual serving workflow:
## Authoring rules (checkable)
| Surface | How it is authored |
|---------|-------------------|
| Routes / forms / admin | GFM tables + class methods |
| Look-and-feel | Host shell CSS + **style tables** |
| Author business JavaScript | **none** |
| Author hand-written `.css` | **none** |
```bash
cargo build -p marqdo_plugin_web
marqdo run examples/web-site/index.mq.md
```sh
target/debug/marqdo call skills/marqdo-dev/index.mq.md prepare_engineering --effects process.exec --fs-root . --require-ok --json
target/debug/marqdo call skills/marqdo-dev/index.mq.md prepare_web --effects plugin --fs-root . --require-ok --json
target/debug/marqdo call examples/web-site/index.mq.md serve --effects plugin,fs.write,network.write --fs-root examples/web-site --require-ok --json
```
http://127.0.0.1:18081/ — `/about`, `/new` (validation), `/admin` (list + create).
Open http://127.0.0.1:18081/ and use admin/demo only as local fixture credentials. Default SQLite belongs to the granted site root; restart preserves existing rows. The listener blocks in this process and the caller owns shutdown.
```bash
find examples/web-site \( -name '*.js' -o -name '*.css' \) | wc -l # 0
Read by responsibility:
- [Site entry](index.mq.md) — declare Home and compose actual data, form, session, gate and listener resources.
- [Layout entry](components/index.mq.md) — public rail and separate desk tree; terminal leaves live in components/content.
- [Article request resources](components/articles.mq.md) — current summary cards and actual captured-slug full Markdown detail.
- [Shared form](forms.mq.md) — actual fields/rules are in forms.tables.md; failed validation retains CSRF.
- [Theme entry](styles/index.mq.md) — retain original data and project only structural addresses plus wrapper geometry.
- [Native verification tool](verify.mq.md) — actually compare 412 original layout/motion declaration rows and return real CSS identities.
```sh
target/debug/marqdo call examples/web-site/verify.mq.md theme_values --effects plugin,fs.read --fs-root examples/web-site --require-ok --json
```
Chinese twin: [`examples/web-site-zh/`](../web-site-zh/).
Theme output is generated at public/generated/theme.css; edit the adjacent source tables rather than that rebuildable artifact. Original Google Fonts links remain declared, with the original fallback families offline. Local browser acceptance does not claim external font-service delivery.
The public creation form remains public, while the custom desk is role-gated. Rendering the same form in Admin does not make its submission endpoint private. HTTP regression uses owned copied sites on Tree and Bytecode; real-browser cases verify styles, publishing, detail, session navigation, logout and narrow-screen order without modifying the example's existing database.
For the hands-on sequence see [DEMO.md](DEMO.md)。