Fills the middle of the site. Nine routes, every body a heading slice of AGENTS.md or README.md, and the article layout given the furniture the design calls for. The manifest gains the two concepts nothing covered: /concepts/task-files/ (the header format, from AGENTS.md's own section) and /concepts/adapters/ (the adapter summary, which is the other half of the three-layer law). /concepts/stages/ now runs through "Moving a task", because the five directories and moving between them are one idea. The layout: - A lede under the title — the one sentence an article authors, taken from the manifest's `description` or an explicit `lede` where the two want different words. A slice starts mid-document; a reader arriving from the nav is owed a line saying what they are looking at. - Prev/next at the foot, walking the sidebar's own order so the arrows and the rail cannot disagree. Pages with no section (the landing page, the 404) are not on the flow. - "Edit this page on GitHub" anchors to the section the page was cut from, built from the same `from` heading the slice starts at. Two bugs the new pages found: - string.Template substitutes inside HTML comments, so a comment naming the body placeholder emitted the whole body twice and closed itself early on the first `-->` in it. - Promotion could produce a second <h1>. A slice that deliberately runs past its own section carries headings at the `from` level, and those promoted to h1 on a page that already had one. Promotion now stops at h2, where they read as peers — which is what putting them on one page said in the first place. tests/test_site_pages.py covers the furniture on the real built site: the routes, the layout, the sidebar marking one page, the contents list being exactly the body's own h2s in order, the prev/next chain end to end, the edit link's anchor, the six landing-page doors, and a table, a fenced block and a nested list surviving the renderer. The scratch-repo helper now copies every file a slice links to, since the builder checks those exist. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
92 lines
2.7 KiB
HTML
92 lines
2.7 KiB
HTML
<!doctype html>
|
|
<!-- Layout "article" — 1a Harbour from the turn-2 docs design: three
|
|
columns, the sidebar carrying the IA, the generated body in the
|
|
middle, contents and the two GitHub links in the gutter.
|
|
|
|
Placeholders are string.Template's; a literal dollar in the markup
|
|
would have to be doubled. -->
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>$title · $site_title</title>
|
|
<meta name="description" content="$description">
|
|
<link rel="canonical" href="$canonical">
|
|
<link rel="icon" href="$icon">
|
|
<link rel="stylesheet" href="$stylesheet">
|
|
</head>
|
|
<body class="page-article">
|
|
|
|
<div class="topbar">
|
|
<span class="topbar-org">12vectors</span>
|
|
<span class="topbar-sep">/</span>
|
|
<span class="topbar-repo">bench</span>
|
|
<span class="spacer"></span>
|
|
<span>docs for $version</span>
|
|
</div>
|
|
|
|
<header class="masthead">
|
|
<a class="wordmark" href="/">
|
|
<span class="wordmark-name">$site_title</span>
|
|
<span class="wordmark-tag">$site_tagline</span>
|
|
</a>
|
|
<nav class="nav">
|
|
$nav
|
|
</nav>
|
|
<span class="spacer"></span>
|
|
<a class="button button-solid" href="$repo_url">GitHub ↗</a>
|
|
</header>
|
|
|
|
<div class="shell">
|
|
|
|
<aside class="side">
|
|
$sidebar
|
|
<div class="side-note">
|
|
<span class="mono dim">$version</span>
|
|
<span>Generated from the repository's own markdown. What the docs
|
|
say and what bench does cannot drift apart.</span>
|
|
</div>
|
|
</aside>
|
|
|
|
<article class="prose">
|
|
<div class="crumbs">$breadcrumb</div>
|
|
<h1>$title</h1>
|
|
<!-- The one sentence an article authors. Everything below it is the
|
|
body placeholder: a heading slice of the file named in the
|
|
gutter. (Placeholders substitute inside comments too, so this
|
|
one cannot spell that name out.) -->
|
|
<p class="prose-lede">$lede</p>
|
|
$body
|
|
$flow
|
|
</article>
|
|
|
|
<aside class="gutter">
|
|
<div class="toc">
|
|
$toc
|
|
<div class="rule"></div>
|
|
<a class="gutter-link" href="$source_url">Edit this page on GitHub ↗</a>
|
|
<a class="gutter-link" href="$issues_url">Open an issue ↗</a>
|
|
</div>
|
|
<p class="marginalia">← this page is a slice of
|
|
<span class="mono">$source_path</span>; rename that heading and the
|
|
build stops</p>
|
|
</aside>
|
|
|
|
</div>
|
|
|
|
<footer class="footer">
|
|
<pre class="footer-mark"> ___________________
|
|
|___________________|
|
|
|| ||
|
|
|| ||</pre>
|
|
<div class="footer-id">
|
|
<span class="footer-name">$site_title</span>
|
|
<span class="mono">a 12vectors product · built in the open</span>
|
|
</div>
|
|
<span class="spacer"></span>
|
|
<a class="mono footer-repo" href="$repo_url">github.com/12vectors/bench</a>
|
|
</footer>
|
|
|
|
</body>
|
|
</html>
|