Skip to content

Commit 8e10219

Browse files
ansMHanmerPProfizi
authored andcommitted
Feedback
1 parent 8199f44 commit 8e10219

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.ci/generate_operators_doc.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,9 @@ def generate_toc_tree(docs_path):
157157
file.is_file() and file.suffix == ".md"
158158
): # Ensure 'file' is a file with .md extension
159159
file_name = file.name
160+
file_path = f"{category}/{file_name}"
160161
operator_name = file_name.replace("_", " ").replace(".md", "")
161-
operators.append({"operator_name": operator_name, "file_name": file_name})
162+
operators.append({"operator_name": operator_name, "file_path": file_path})
162163
data.append({"category": category, "operators": operators})
163164

164165
# Render the Jinja2 template
@@ -168,7 +169,7 @@ def generate_toc_tree(docs_path):
168169
output = template.render(data=data) # Pass 'data' as a named argument
169170

170171
# Write the rendered output to toc.md
171-
with Path.open(docs_path / "toc.md", "w") as file:
172+
with Path.open(docs_path / "toc.yml", "w") as file:
172173
file.write(output)
173174

174175

doc/source/operators_doc/toc_template.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
- name: {{ category.category }}
55
items:{% for operator in category.operators %}
66
- name: {{ operator.operator_name }}
7-
href: {{ operator.file_name }}{% endfor %}
7+
href: {{ operator.file_path }}{% endfor %}
88
{% endfor %}

0 commit comments

Comments
 (0)