mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-23 16:43:56 +00:00
docs: fix warnings in documentation generation
--amend
This commit is contained in:
parent
9b69b6ac05
commit
499557bc19
27 changed files with 210 additions and 230 deletions
|
|
@ -255,22 +255,28 @@ def process_provider_registry(progress, change_tracker: ChangedPathTracker) -> N
|
|||
change_tracker.add_paths(doc_output_dir)
|
||||
|
||||
index_content = []
|
||||
index_content.append(f"# {api_name.title()} Providers")
|
||||
index_content.append("")
|
||||
index_content.append(f"# {api_name.title()} \n")
|
||||
index_content.append("## Overview\n")
|
||||
|
||||
index_content.append(
|
||||
f"This section contains documentation for all available providers for the **{api_name}** API."
|
||||
f"This section contains documentation for all available providers for the **{api_name}** API.\n"
|
||||
)
|
||||
index_content.append("")
|
||||
|
||||
index_content.append("## Providers\n")
|
||||
|
||||
toctree_entries = []
|
||||
|
||||
for provider_type, provider in sorted(providers.items()):
|
||||
provider_doc_file = doc_output_dir / f"{provider_type.replace('::', '_').replace(':', '_')}.md"
|
||||
filename = provider_type.replace("::", "_").replace(":", "_")
|
||||
provider_doc_file = doc_output_dir / f"{filename}.md"
|
||||
|
||||
provider_docs = generate_provider_docs(provider, api_name)
|
||||
|
||||
provider_doc_file.write_text(provider_docs)
|
||||
change_tracker.add_paths(provider_doc_file)
|
||||
toctree_entries.append(f"{filename}")
|
||||
|
||||
index_content.append(f"- [{provider_type}]({provider_doc_file.name})")
|
||||
index_content.append(f"```{{toctree}}\n:maxdepth: 1\n\n{'\n'.join(toctree_entries)}\n```\n")
|
||||
|
||||
index_file = doc_output_dir / "index.md"
|
||||
index_file.write_text("\n".join(index_content))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue