Files
mcdoc/web/templates/doc.html
Kyle Isom 28afaa2c56 Implement mcdoc v0.1.0: public documentation server
Single-binary Go server that fetches markdown from Gitea (mc org),
renders to HTML with goldmark (GFM, chroma syntax highlighting,
heading anchors), and serves a navigable read-only documentation site.

Features:
- Boot fetch with retry, webhook refresh, 15-minute poll fallback
- In-memory cache with atomic per-repo swap
- chi router with htmx partial responses for SPA-like navigation
- HMAC-SHA256 webhook validation
- Responsive CSS, TOC generation, priority doc ordering
- $PORT env var support for MCP agent port assignment

33 tests across config, cache, render, and server packages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 13:04:15 -07:00

18 lines
346 B
HTML

{{define "content"}}
{{if .TOC}}
<nav class="toc">
<details open>
<summary>Contents</summary>
<ul>
{{range .TOC}}
<li class="toc-h{{.Level}}"><a href="#{{.ID}}">{{.Text}}</a></li>
{{end}}
</ul>
</details>
</nav>
{{end}}
<article class="doc-content">
{{.Content}}
</article>
{{end}}