Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0001-docs FR-001
The Markdown twin of a page (commons 0011-documentation FR-028): every page of the site is also written as Markdown beside its HTML, from the same page model, so that a reader that is a program (an agent) reads the words and the structure and not the markup. Every case of a block and an inline is matched with a switch that ends in absurd, so that a case added to the model and left out here does not compile. Links to pages of the site point at the Markdown twin of the page.
Source: commons/docs/src/emit/markdown.ts
3 of 3 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.
function llmsIndex(name: string, pages: readonly Page[], extras?: readonly (readonly [path: string, what: string])[]): string
The index of the site for a program, llms.txt: the name, what the site is, and every page as a link to its Markdown twin with its description, by section.
| Parameter | What it is |
|---|
name | the site's name |
pages | the pages |
extras | other files an agent is told of (the JSON of a model), by path and what they are |
Imported by 3 tests of the run (3 passed, 0 failed): the library's results
function markdownOf(page: Page): string
A page as Markdown: its title, its description and its blocks.
| Parameter | What it is |
|---|
page | the page |
Imported by 36 tests of the run (36 passed, 0 failed): the library's results
const twinOf: (path: string) => string
The path of the Markdown twin of a page: its own with .md for .html.
Imported by 3 tests of the run (3 passed, 0 failed): the library's results