refactor component path

Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
This commit is contained in:
Francisco Javier Arceo 2025-07-29 21:20:21 -04:00
parent a29b62f820
commit 19d2555424
116 changed files with 7064 additions and 1265 deletions

View file

@ -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))