Module Wodoc.Llms
Generate the LLM-friendly index files for a built project doc, from the Markdown twin tree that Wodoc.Build produces in the output directory.
Follows the llms.txt convention (llmstxt.org): a single H1 with the project name, a blockquote summary, then sections listing the Markdown pages.
val write :
out:string ->
title:string ->
landing:string option ->
order:string list ->
unitwrite ~out ~title ~landing ~order writes, at the version root out:
llms.txt: the index, with# title, a>blockquote summary (the first paragraph of thelandingMarkdown page when given, else a generic line), then a## Manualand a## APIsection listing every.mdpage found underout(manual = lowercase-named pages, API = Capitalised modules), each as- [H1 title](relative path);llms-full.txt: all those pages concatenated, for single-shot ingestion.
order is a list of .md paths giving the preferred (project-nav) ordering; pages absent from it follow alphabetically. Does nothing if no .md page exists under out (e.g. markdown generation was skipped).