MCPcopy Create free account
hub / github.com/NVIDIA/NeMo-Relay / _write_index

Function _write_index

scripts/docs/generate_rust_library_reference.py:621–634  ·  view source on GitHub ↗
(output_dir: Path)

Source from the content-addressed store, hash-verified

619
620
621def _write_index(output_dir: Path) -> None:
622 lines = [
623 frontmatter(
624 "Rust Library Reference",
625 "Generated Rust API reference for NeMo Relay crates.",
626 3,
627 normalize=_ascii,
628 ),
629 f"{GENERATED_BY}\n\n",
630 "## Crates\n\n",
631 ]
632 for crate_name, _crate_dir_name, description in CRATES:
633 lines.append(f"- [{crate_name}]({BASE_URL}/{_crate_slug(crate_name)}): {_escape_text(description)}\n")
634 (output_dir / "index.mdx").write_text("".join(lines), encoding="utf-8")
635
636
637def generate(repo_root: Path, doc_root: Path, output_dir: Path, *, run_cargo_doc: bool) -> int:

Callers 1

generateFunction · 0.70

Calls 4

frontmatterFunction · 0.90
_crate_slugFunction · 0.85
joinMethod · 0.80
_escape_textFunction · 0.70

Tested by

no test coverage detected