- CHANGELOG.md:v2.8.0 条目(中英双语); - README.md:版本行 2.7.1→2.8.0 + 愿景第 6 条(知识可证明); - doc/releases/v2.8.0.md:双语发版说明(亮点/用法/已知限制); - skills/marqdo-dev/index.mq.md:新增 prove 任务(路径/目录模式/ require_lean/json;参数用 + 行声明升参,check 与 narrative-ratio 通过); - 设计文档 §12.5 标记已合入;发版链接统一指向 doc/releases/v2.8.0.md。
4.4 KiB
Executable File
markup, type, view, route, title, import
| markup | type | view | route | title | import | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| occlusion | web | main | / | Marqdo Net Site |
|
Read this entry, then the layout index, content leaves, database entry, form resource and browser client. Home, About, Publish and Tools are declared Documents. Native administration remains enabled and login-gated. The /live socket is a separate network resource. No page uses the removed compose APIs or a raw HTML shell.
main
| 返回 | 类型 | 说明 |
|---|---|---|
| result | list | Shared recursive frame around introduction, echo controls and current articles |
This startup function describes structure, reading only the terminal Markdown leaves. The database query remains a typed resource resolved per request, while the client uses native controls and the official bridge. Rendering the page cannot initialize or clear business records. Follow each component import to edit one responsibility instead of reproducing the complete page.
We body = Assemble the three independent home responsibilities. Return Place them in the shared recursive site frame.
serve
| 参数 | 类型 | 默认 | 说明 |
|---|---|---|---|
| root | text | "examples/web-net-site" | Explicit discovery directory relative to the checkout |
| port | number | 18083 | Local demonstration listen port |
| url | any | None | None chooses the site-root SQLite file; tests use an owned temporary URI |
| 返回 | 类型 | 说明 |
|---|---|---|
| result | map | Blocking listener with retained article data, forms, authentication and echo |
Use root="examples/web-net-site", port=18083 and url=None from the checkout, with --fs-root examples/web-net-site and plugin,fs.write,network.write. Build current browser assets into public/generated through the development handbook first. Missing runtime assets stop before listening rather than leaving the widget apparently ready.
Initialization preserves existing articles and seeds only an empty table. Theme compilation uses the original property declarations and writes only the explicit generated stylesheet. Discovery assembles the readable Documents, then the workflow enables native administration, attaches local fixture credentials, mounts the public article form and binds anonymous loopback echo. Real deployment must replace fixture credentials and its network policy. Keep each returned app before listening.
assets =
| file |
|---|
| public/generated/marqdo_wasm.wasm |
| public/generated/marqdo-bridge.js |
- [Require the actual runtime resources before serving](for assets as file)
- not The selected runtime asset exists
Return [Explain the required browser preparation](result.error(code="net_site.browser_assets", message="build current browser assets into public/generated before serve", operation="serve")).
We store = Initialize the retained article database and css = Compile the actual declarative theme and Create only the generated resource directory and [Write that explicit stylesheet through native IO](fs.atomic_write(path="public/generated/theme.css", text=
css)). We app = [Discover all declared Documents and the static root](web.prepare(root=root, host="127.0.0.1", port=port, db=store, static_dir="public")) and app = Retain the existing native administration capability.
- not The selected runtime asset exists
Return [Explain the required browser preparation](result.error(code="net_site.browser_assets", message="build current browser assets into public/generated before serve", operation="serve")).
We store = Initialize the retained article database and css = Compile the actual declarative theme and Create only the generated resource directory and [Write that explicit stylesheet through native IO](fs.atomic_write(path="public/generated/theme.css", text=
users =
| @ | username | password | role |
|---|---|---|---|
| 1 | admin | secret | admin |
We app = [Attach actual login sessions and the native admin gate](auth.attach(app=app, users=users, login_path="/admin/login", login_redirect="/admin", logout_redirect="/")) and article = Build the shared validation resource and app = [Mount the public creation form explicitly](form.mount(app=app, id="article", form=article)).
We app = [Bind the original local WebSocket echo route](socket.route(app=app, path="/live", mode="echo", require_auth=False)).
Return Listen only after data, resources and policy are ready.