Commit 9bf6f65
authored
fix(infra): agent-friendly docs spec v0.5.0 — easy compliance wins (#182)
Closes two of the six failures found in #181.
## Summary
- **`llms-txt-directive-md`**: inject `> For the complete documentation
index, see [llms.txt](/llms.txt)` near the top of every generated `.md`
file, inside `cleanMarkdown()` in `plugins/astro-agent-docs.mjs`. This
is a new mandatory requirement in spec v0.5.0 (split from the previous
single `llms-txt-directive` check).
- **`content-negotiation`**: add `public/_headers` to serve `.md` files
with `Content-Type: text/markdown; charset=utf-8`. Fixing this may also
resolve the `content-start-position` failures (34/50 pages) as a side
effect — once agents receive a proper `text/markdown` response, they
should use the clean `.md` files (which start with content immediately)
instead of converting Starlight's nav-heavy HTML.
## Sync recommendation
hand-written1 parent c6a13f4 commit 9bf6f65
2 files changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
90 | 93 | | |
91 | 94 | | |
92 | 95 | | |
| |||
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
99 | | - | |
| 102 | + | |
100 | 103 | | |
101 | 104 | | |
102 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
0 commit comments