atproto utils for zig zat.dev
atproto sdk zig

feat: generate devlog index page

- rename build-wisp-docs.mjs -> build-site.mjs
- generate devlog/index.md listing all entries (newest first)
- header link now goes to devlog index instead of specific entry

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

Changed files
+24 -4
.tangled
workflows
scripts
site
+2 -2
.tangled/workflows/deploy-docs.yml
··· 14 14 WISP_SITE_NAME: "docs" 15 15 16 16 steps: 17 - - name: build docs site 17 + - name: build site 18 18 command: | 19 - bun ./scripts/build-wisp-docs.mjs 19 + bun ./scripts/build-site.mjs 20 20 21 21 - name: deploy docs to wisp 22 22 command: |
+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
··· 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>