oficina / mapa Public

Review M1: Help → Markdown in Mapa is a page

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Summary

Fable's Phase 1 review (6e3aa6b): Review M1: Help → Markdown in Mapa is a page
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 4477ae47c9ee870e8f0831d517ce52d629ce5150 parent ede88c5
4 files changed, +64 −1
  • internal/mapa/render.go +1 −1
  • internal/mapa/side.go +14 −0
  • internal/mapa/static/frame.css +6 −0
  • internal/mapa/templates/help_markdown.html +43 −0
diff --git a/internal/mapa/render.go b/internal/mapa/render.go
index 938151a..86e6d26 100644
--- a/internal/mapa/render.go
+++ b/internal/mapa/render.go
@@ -85,7 +85,7 @@ var shellOf = map[string]string{
"deleted": "shell", "restore": "shell", "day": "shell",
"scratch": "shell", "scratch_new": "shell", "share": "shell",
"settings": "shell", "search": "shell", "conflict": "shell",
- "revision": "shell", "blocks": "shell",
+ "revision": "shell", "blocks": "shell", "help_markdown": "shell",
}
func init() {
diff --git a/internal/mapa/side.go b/internal/mapa/side.go
index 78539de..b49d7cc 100644
--- a/internal/mapa/side.go
+++ b/internal/mapa/side.go
@@ -70,6 +70,20 @@ func linksState(request *http.Request) string {
func (app *app) viewRoutes(router chi.Router) {
router.Post("/view/sidebar", app.viewSidebar)
router.Post("/view/links", app.viewLinks)
+ router.Get("/help/markdown", app.helpMarkdown)
+}
+
+// helpMarkdown is Help → Markdown in Mapa (review M1): the subset a page
+// is written in, and nothing it does not read.
+func (app *app) helpMarkdown(writer http.ResponseWriter,
+ request *http.Request) {
+ viewer, err := app.viewer(request)
+ if err != nil {
+ app.fail(writer, request, err)
+ return
+ }
+ app.show(writer, request, http.StatusOK, "help_markdown", view{
+ Title: "Markdown in Mapa", Nav: nav(""), Viewer: viewer})
}
// viewSidebar folds or opens the sidebar. "state" names the new state;
diff --git a/internal/mapa/static/frame.css b/internal/mapa/static/frame.css
index 4976648..41db2ae 100644
--- a/internal/mapa/static/frame.css
+++ b/internal/mapa/static/frame.css
@@ -396,3 +396,9 @@ form[mapa-new-page-form] p { margin: 0; font-size: 12px; }
[mapa-app] { grid-template-columns: minmax(0, 1fr); }
[mapa-side] { display: none; }
}
+
+/* Help → Markdown in Mapa. */
+table[mapa-help-table] { inline-size: 100%; border-collapse: collapse; margin-block: 8px 20px; font-size: 14.5px; }
+table[mapa-help-table] th { text-align: start; color: var(--rst-text-muted); font-size: 12px; font-weight: 650; padding: 6px 12px 6px 0; border-block-end: 1px solid var(--rst-line); }
+table[mapa-help-table] td { padding: 8px 12px 8px 0; border-block-end: 1px solid var(--rst-line); vertical-align: top; }
+table[mapa-help-table] td:first-child { white-space: nowrap; }
diff --git a/internal/mapa/templates/help_markdown.html b/internal/mapa/templates/help_markdown.html
new file mode 100644
index 0000000..39f7d60
--- /dev/null
+++ b/internal/mapa/templates/help_markdown.html
@@ -0,0 +1,43 @@
+{{define "content"}}
+<header mapa-page-head>
+<div mapa-doc-kicker><span>{{icon "help-circle"}}Help</span></div>
+<h1 mapa-title>Markdown in Mapa</h1>
+</header>
+<article mapa-body mapa-help>
+<p>A page is Markdown: what you type is what is stored. Mapa reads a small part of Markdown, and everything else stays as the text you typed.</p>
+<h2>Blocks</h2>
+<table mapa-help-table>
+<thead><tr><th scope="col">Type</th><th scope="col">For</th></tr></thead>
+<tbody>
+<tr><td><code># Heading</code>, <code>## Heading</code>, <code>### Heading</code></td><td>A heading. The page's title is above it, so <code>#</code> is the largest heading in the text.</td></tr>
+<tr><td><code>- item</code>, <code>* item</code>, <code>+ item</code></td><td>A bulleted list. Indent by two spaces to nest.</td></tr>
+<tr><td><code>1. item</code>, <code>1) item</code></td><td>A numbered list.</td></tr>
+<tr><td><code>- [ ] task</code>, <code>- [x] done</code></td><td>A checklist.</td></tr>
+<tr><td><code>&gt; quote</code></td><td>A quotation.</td></tr>
+<tr><td><code>```</code> … <code>```</code></td><td>Code, kept exactly as typed.</td></tr>
+<tr><td><code>---</code></td><td>A divider.</td></tr>
+</tbody>
+</table>
+<p>A blank line starts a new block. A line break inside a paragraph is kept.</p>
+<h2>Inside a line</h2>
+<table mapa-help-table>
+<thead><tr><th scope="col">Type</th><th scope="col">For</th></tr></thead>
+<tbody>
+<tr><td><code>**bold**</code>, <code>*italic*</code></td><td>Emphasis. Mapa has no other kind, and no escapes: <code>*word*</code> is always italic.</td></tr>
+<tr><td><code>`code`</code></td><td>Code inside a sentence.</td></tr>
+<tr><td><code>[text](https://…)</code></td><td>A web link. A bare <code>https://</code> address is a link too.</td></tr>
+</tbody>
+</table>
+<h2>Links between pages</h2>
+<table mapa-help-table>
+<thead><tr><th scope="col">Type</th><th scope="col">For</th></tr></thead>
+<tbody>
+<tr><td><code>[[Page title]]</code></td><td>A link to a team page. If no page has that title yet, the link is drawn dashed until someone writes it.</td></tr>
+<tr><td><code>[[Page title|shown text]]</code></td><td>The same link, showing other words.</td></tr>
+<tr><td><code>[[2026-11-12]]</code></td><td>A date. It opens <em>your own</em> note for that day, whoever reads it.</td></tr>
+<tr><td><code>[[Page title#^a1b2c3]]</code></td><td>A link to one block of a team page. Page → Link to a block adds the <code>^a1b2c3</code> marker to it.</td></tr>
+</tbody>
+</table>
+<p>Links keep the text you typed. When a page is renamed, its old title still leads to it.</p>
+</article>
+{{end}}