+2
-2
.tangled/workflows/deploy-docs.yml
+2
-2
.tangled/workflows/deploy-docs.yml
+21
-1
scripts/build-wisp-docs.mjs
scripts/build-site.mjs
+21
-1
scripts/build-wisp-docs.mjs
scripts/build-site.mjs
···
158
}
159
}
160
161
-
// Copy devlog files to docs/devlog/ (accessible via SPA but not in sidebar)
162
const devlogFiles = (await exists(devlogDir)) ? await listMarkdownFiles(devlogDir) : [];
163
for (const rel of devlogFiles) {
164
const src = path.join(devlogDir, rel);
165
const dst = path.join(outDocsDir, "devlog", rel);
166
await mkdir(path.dirname(dst), { recursive: true });
167
await cp(src, dst);
168
}
169
170
// Stable nav order: README homepage, then roadmap, then changelog, then the rest.
···
158
}
159
}
160
161
+
// Copy devlog files to docs/devlog/ and generate an index
162
const devlogFiles = (await exists(devlogDir)) ? await listMarkdownFiles(devlogDir) : [];
163
+
const devlogEntries = [];
164
+
165
for (const rel of devlogFiles) {
166
const src = path.join(devlogDir, rel);
167
const dst = path.join(outDocsDir, "devlog", rel);
168
await mkdir(path.dirname(dst), { recursive: true });
169
await cp(src, dst);
170
+
171
+
const md = await readFile(src, "utf8");
172
+
devlogEntries.push({
173
+
path: `devlog/${rel}`,
174
+
title: titleFromMarkdown(md, rel),
175
+
});
176
+
}
177
+
178
+
// Generate devlog index listing all entries (newest first by filename)
179
+
if (devlogEntries.length > 0) {
180
+
devlogEntries.sort((a, b) => b.path.localeCompare(a.path));
181
+
const indexMd = [
182
+
"# devlog",
183
+
"",
184
+
...devlogEntries.map((e) => `- [${e.title}](${e.path.replace("devlog/", "")})`),
185
+
"",
186
+
].join("\n");
187
+
await writeFile(path.join(outDocsDir, "devlog", "index.md"), indexMd, "utf8");
188
}
189
190
// Stable nav order: README homepage, then roadmap, then changelog, then the rest.
+1
-1
site/index.html
+1
-1
site/index.html
···
16
</button>
17
<a class="brand" href="./">zat.dev</a>
18
<div class="header-links">
19
-
<a class="header-link" href="#devlog/001-self-publishing-docs.md">devlog</a>
20
<a class="header-link" href="https://tangled.sh/zat.dev/zat" target="_blank" rel="noopener noreferrer">repo</a>
21
</div>
22
</header>