Commit a0181dd
authored
DX-2659 (#696)
* feat: add initial llm.txt generator
* feat: llms.txt parity
* feat: align llms-full.txt structure with upstream Mintlify output
Refactor the builder to emit llms-full.txt in upstream's per-page format:
# <title>
Source: <url> # no .md suffix
<blank lines> # 3 for MDX pages, 1 for OpenAPI ops
<body>
<blank lines> # 2 before the next page
OpenAPI operations now carry a synthesized metadata line
(`<spec> <method> <api-path>`) followed by the description, matching
how Mintlify renders spec-driven pages. `expandOpenApi` now returns
the method and API path alongside the existing fields.
Apply the high-frequency content transforms Mintlify does at build
time so MDX bodies look closer to the published markdown:
- bullet `- ` → `* `
- horizontal rule `---` → `***`
- code fence ``` ```lang ``` → ``` ```lang theme={"system"} ```
- internal links `/foo` → `/docs/foo`
- link-URL `\&` → `&`
- trailing whitespace trimmed on every line
Known divergences from upstream llms-full.txt (~53K of 87K lines):
- JSX component children (`<Tabs>`, `<Tab>`, `<Accordion>`, `<Steps>`)
are re-indented by 4 spaces per nesting level in upstream. We emit
them verbatim from the source MDX, because correct re-indentation
requires a real MDX/JSX parser (remark-mdx + remark-stringify with
component-aware rules).
- Markdown tables are column-padded in upstream so cell boundaries
align vertically. We emit tables verbatim.
- Some `<img>` tags get `src=` attributes injected from external data
(e.g. shields.io badge URLs). We can't reproduce these without
Mintlify's component resolution data.
- Blank-line spacing around components occasionally differs because
of the above re-indentation pass.
llms.txt remains byte-identical to upstream. Closing the llms-full.txt
gap fully would require implementing a Mintlify-compatible MDX
serializer; tracked as future work.
* fix: add readme file1 parent e037cfd commit a0181dd
12 files changed
Lines changed: 90283 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments