Release 2.7.0: executable handbooks and native user-site workflows
This commit is contained in:
1 parent
aa0c4d0f55
commit
d9aef957f7
562 files changed
+21064
-20387
No files matched your search
@@ -9,10 +9,14 @@ response: json
|
||||
|
||||
# main
|
||||
|
||||
| 返回 | 类型 | 说明 |
|
||||
|---|---|---|
|
||||
| result | any | The value explicitly returned below; conditional returns follow the selected branch |
|
||||
|
||||
`result` =
|
||||
|
||||
| ok | ping |
|
||||
|----|------|
|
||||
| True | pong |
|
||||
|
||||
*result*
|
||||
After these steps, return *result*.
|
||||
@@ -15,5 +15,5 @@ This leaf owns only the footer/brand Markdown content; its parent owns placement
|
||||
Edit adjacent content.md to change prose. Add a child directory when a second
|
||||
layout responsibility appears instead of introducing HTML into the content.
|
||||
|
||||
**body = fs.read_text path="components/footer/brand/content.md"**
|
||||
*> component.markdown text=`body` slot="footer-brand"*
|
||||
We first **body = [Compute body](fs.read_text(path="components/footer/brand/content.md"))** for the next step.
|
||||
After these steps, return *component.markdown(text=`body`, slot="footer-brand")*.
|
||||
@@ -17,8 +17,8 @@ This parent arranges brand content and the link-region subtree. Content stays
|
||||
in their Markdown leaves; this file owns their one placement relationship. Continue into each child index when another independent layout
|
||||
remains. Preserve node lists rather than rendering children into HTML strings.
|
||||
|
||||
**brand_nodes = > brand.nodes**
|
||||
**links_nodes = > links.nodes**
|
||||
**siblings = component.merge a=`brand_nodes` b=`links_nodes`**
|
||||
**footer_columns = layout.columns children=`siblings` slot="footer"**
|
||||
*> component.wrap children=`footer_columns` kind="footer" slot="footer"*
|
||||
We first **brand_nodes = [Compute brand_nodes](brand.nodes())** for the next step.
|
||||
We first **links_nodes = [Compute links_nodes](links.nodes())** for the next step.
|
||||
We first **siblings = [Compute siblings](component.merge(a=`brand_nodes`, b=`links_nodes`))** for the next step.
|
||||
We first **footer_columns = [Compute footer_columns](layout.columns(children=`siblings`, slot="footer"))** for the next step.
|
||||
After these steps, return *component.wrap(children=`footer_columns`, kind="footer", slot="footer")*.
|
||||
@@ -15,5 +15,5 @@ This leaf owns only the footer/links/community Markdown content; its parent owns
|
||||
Edit adjacent content.md to change prose. Add a child directory when a second
|
||||
layout responsibility appears instead of introducing HTML into the content.
|
||||
|
||||
**body = fs.read_text path="components/footer/links/community/content.md"**
|
||||
*> component.markdown text=`body` slot="footer-links-community"*
|
||||
We first **body = [Compute body](fs.read_text(path="components/footer/links/community/content.md"))** for the next step.
|
||||
After these steps, return *component.markdown(text=`body`, slot="footer-links-community")*.
|
||||
@@ -15,5 +15,5 @@ This leaf owns only the footer/links/docs Markdown content; its parent owns plac
|
||||
Edit adjacent content.md to change prose. Add a child directory when a second
|
||||
layout responsibility appears instead of introducing HTML into the content.
|
||||
|
||||
**body = fs.read_text path="components/footer/links/docs/content.md"**
|
||||
*> component.markdown text=`body` slot="footer-links-docs"*
|
||||
We first **body = [Compute body](fs.read_text(path="components/footer/links/docs/content.md"))** for the next step.
|
||||
After these steps, return *component.markdown(text=`body`, slot="footer-links-docs")*.
|
||||
@@ -17,7 +17,7 @@ This parent arranges documentation links and community links. Content stays
|
||||
in their Markdown leaves; this file owns their one placement relationship. Continue into each child index when another independent layout
|
||||
remains. Preserve node lists rather than rendering children into HTML strings.
|
||||
|
||||
**docs_nodes = > docs.nodes**
|
||||
**community_nodes = > community.nodes**
|
||||
**siblings = component.merge a=`docs_nodes` b=`community_nodes`**
|
||||
*> layout.columns children=`siblings` slot="footer-links"*
|
||||
We first **docs_nodes = [Compute docs_nodes](docs.nodes())** for the next step.
|
||||
We first **community_nodes = [Compute community_nodes](community.nodes())** for the next step.
|
||||
We first **siblings = [Compute siblings](component.merge(a=`docs_nodes`, b=`community_nodes`))** for the next step.
|
||||
After these steps, return *layout.columns(children=`siblings`, slot="footer-links")*.
|
||||
@@ -18,9 +18,9 @@ This parent arranges navigation, main content and footer. Content stays
|
||||
in their Markdown leaves; this file owns their one placement relationship. Continue into each child index when another independent layout
|
||||
remains. Preserve node lists rather than rendering children into HTML strings.
|
||||
|
||||
**nav_nodes = > nav.nodes**
|
||||
**content_nodes = > content.nodes**
|
||||
**footer_nodes = > footer.nodes**
|
||||
**upper_regions = component.merge a=`nav_nodes` b=`content_nodes`**
|
||||
**home_regions = component.merge a=`upper_regions` b=`footer_nodes`**
|
||||
*> layout.stack children=`home_regions` slot="home"*
|
||||
We first **nav_nodes = [Compute nav_nodes](nav.nodes())** for the next step.
|
||||
We first **content_nodes = [Compute content_nodes](content.nodes())** for the next step.
|
||||
We first **footer_nodes = [Compute footer_nodes](footer.nodes())** for the next step.
|
||||
We first **upper_regions = [Compute upper_regions](component.merge(a=`nav_nodes`, b=`content_nodes`))** for the next step.
|
||||
We first **home_regions = [Compute home_regions](component.merge(a=`upper_regions`, b=`footer_nodes`))** for the next step.
|
||||
After these steps, return *layout.stack(children=`home_regions`, slot="home")*.
|
||||
@@ -15,5 +15,5 @@ This leaf owns only the main Markdown content; its parent owns placement.
|
||||
Edit adjacent content.md to change prose. Add a child directory when a second
|
||||
layout responsibility appears instead of introducing HTML into the content.
|
||||
|
||||
**body = fs.read_text path="components/main/content.md"**
|
||||
*> component.markdown text=`body` slot="main"*
|
||||
We first **body = [Compute body](fs.read_text(path="components/main/content.md"))** for the next step.
|
||||
After these steps, return *component.markdown(text=`body`, slot="main")*.
|
||||
@@ -15,5 +15,5 @@ This leaf owns only the nav Markdown content; its parent owns placement.
|
||||
Edit adjacent content.md to change prose. Add a child directory when a second
|
||||
layout responsibility appears instead of introducing HTML into the content.
|
||||
|
||||
**body = fs.read_text path="components/nav/content.md"**
|
||||
*> component.markdown text=`body` slot="nav"*
|
||||
We first **body = [Compute body](fs.read_text(path="components/nav/content.md"))** for the next step.
|
||||
After these steps, return *component.markdown(text=`body`, slot="nav")*.
|
||||
@@ -10,7 +10,11 @@ import:
|
||||
|
||||
# main
|
||||
|
||||
| 返回 | 类型 | 说明 |
|
||||
|---|---|---|
|
||||
| result | any | The value explicitly returned below; conditional returns follow the selected branch |
|
||||
|
||||
The page selects the layout root; follow components/index.mq.md for decomposition.
|
||||
This main returns rows rather than HTML; view metadata opts into startup assembly.
|
||||
|
||||
*> home.nodes*
|
||||
After these steps, return *home.nodes()*.
|
||||
@@ -1,12 +1,20 @@
|
||||
---
|
||||
markup: occlusion
|
||||
title: Callable preview of the actual layout tree
|
||||
import:
|
||||
home: ./components/index.mq.md
|
||||
web: ext/web/web.mq.md
|
||||
---
|
||||
|
||||
# main
|
||||
Preview begins at the site component root and shares its renderer with the server.
|
||||
|
||||
**nodes = > home.nodes**
|
||||
**html = web.render nodes=`nodes` title="Marqdo layout handbook"**
|
||||
> print text=`html`
|
||||
## main
|
||||
|
||||
| 返回 | 类型 | 说明 |
|
||||
|---|---|---|
|
||||
| result | text | HTML text identical to the existing printed preview |
|
||||
|
||||
Call this ordinary main function to obtain the actual HTML value; run still prints the same preview for existing callers. Markdown leaves are read relative to the granted site root, so use --fs-root examples/web-layout-handbook from the checkout root, with fs.read, plugin and output.write. Preview opens no listener and changes no content. The same node renderer serves the Document, including both footer regions and the nested link columns. Inspecting this returned HTML does not replace browser geometry or interaction checks.
|
||||
|
||||
We **nodes = [Assemble the complete component tree](home.nodes())**, then **html = [Use the same node renderer as the served Document](web.render(nodes=`nodes`, title="Marqdo layout handbook"))**.
|
||||
We **[Keep the existing run preview output](print(text=`html`))**, then return *html*.
|
||||
@@ -6,7 +6,15 @@ import:
|
||||
|
||||
# main
|
||||
|
||||
| 参数 | 类型 | 默认 | 说明 |
|
||||
|---|---|---|---|
|
||||
| port | any | 18081 | Local HTTP listening port; starting the server owns its lifecycle until stopped |
|
||||
|
||||
| 返回 | 类型 | 说明 |
|
||||
|---|---|---|
|
||||
| result | any | None; execute this page's documented steps in order and observe their output or stated effects |
|
||||
|
||||
The `port`=18081 may be overridden with --bind. This launcher owns no layout.
|
||||
|
||||
**listen_port = int value=`port`**
|
||||
> web.serve root="." host="127.0.0.1" port=`listen_port`
|
||||
We first **listen_port = [Compute listen_port](int(value=`port`))** for the next step.
|
||||
We now **[Call web.serve](> web.serve root="." host="127.0.0.1" port=`listen_port`)**.
|
||||
Reference in new issue
Block a user