runtime/reference/std/_overrides/README.md
This directory holds editorial override markdown files that are appended to the autogenerated Standard Library package pages.
scripts/generate_std_docs.ts fetches overview HTML for every
@std/* package from JSR.runtime/reference/std/<package>.md with:
## Additional Examples section containing the override markdown if a file
named _overrides/<package>.md exists.Create a file named after the package, e.g.:
_overrides/internal.md
Put any extra examples, guides, etc. in that file. On the next generation run it will appear under an "Additional Examples" heading.
Important:
--- ... ---) in override files. They are
appended verbatim into the generated page body; frontmatter will show up as
plain text.Minimal example for _overrides/internal.md:
import { diffStr } from "jsr:@std/internal";
console.log(diffStr("a", "b"));
If you need to add content directly inside a generated page and keep it across regenerations, use the custom block markers the generator recognizes:
<!-- custom:start -->
Your custom content here (additional sections, notes, etc.)
<!-- custom:end -->
Anything between those markers is preserved every time the generator runs. If a page has no custom block yet, a commented placeholder will be added for convenience.
_overrides/<pkg>.md) are never modified by the generator; they
are simply read and injected.Run:
deno task generate:std-docs
This will rebuild all pages and keep both overrides and custom block content.
Currently every page is regenerated. If we later want a skip/manual mode, we can
add a frontmatter flag (e.g. generated: false).