mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-28 02:53:30 +00:00
fix: Readthedocs cannot parse comments, resulting in docs bugs (#1033)
This commit is contained in:
parent
ab9516c789
commit
afca9d92f9
10 changed files with 18 additions and 11 deletions
|
@ -131,8 +131,15 @@ class DistributionTemplate(BaseModel):
|
|||
providers_str = ", ".join(f"`{p}`" for p in providers)
|
||||
providers_table += f"| {api} | {providers_str} |\n"
|
||||
|
||||
template = "<!-- This file was auto-generated by distro_codegen.py, please edit source -->\n"
|
||||
template += self.template_path.read_text()
|
||||
template = self.template_path.read_text()
|
||||
comment = "<!-- This file was auto-generated by distro_codegen.py, please edit source -->\n"
|
||||
orphantext = "---\norphan: true\n---\n"
|
||||
|
||||
if template.startswith(orphantext):
|
||||
template = template.replace(orphantext, orphantext + comment)
|
||||
else:
|
||||
template = comment + template
|
||||
|
||||
# Render template with rich-generated table
|
||||
env = jinja2.Environment(
|
||||
trim_blocks=True,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue