+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
158
}
159
159
}
160
160
161
-
// Copy devlog files to docs/devlog/ (accessible via SPA but not in sidebar)
161
+
// Copy devlog files to docs/devlog/ and generate an index
162
162
const devlogFiles = (await exists(devlogDir)) ? await listMarkdownFiles(devlogDir) : [];
163
+
const devlogEntries = [];
164
+
163
165
for (const rel of devlogFiles) {
164
166
const src = path.join(devlogDir, rel);
165
167
const dst = path.join(outDocsDir, "devlog", rel);
166
168
await mkdir(path.dirname(dst), { recursive: true });
167
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");
168
188
}
169
189
170
190
// Stable nav order: README homepage, then roadmap, then changelog, then the rest.
+1
-1
site/index.html
+1
-1
site/index.html
···
16
16
</button>
17
17
<a class="brand" href="./">zat.dev</a>
18
18
<div class="header-links">
19
-
<a class="header-link" href="#devlog/001-self-publishing-docs.md">devlog</a>
19
+
<a class="header-link" href="#devlog/index.md">devlog</a>
20
20
<a class="header-link" href="https://tangled.sh/zat.dev/zat" target="_blank" rel="noopener noreferrer">repo</a>
21
21
</div>
22
22
</header>