File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -157,8 +157,9 @@ def generate_toc_tree(docs_path):
157
157
file .is_file () and file .suffix == ".md"
158
158
): # Ensure 'file' is a file with .md extension
159
159
file_name = file .name
160
+ file_path = f"{ category } /{ file_name } "
160
161
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 })
162
163
data .append ({"category" : category , "operators" : operators })
163
164
164
165
# Render the Jinja2 template
@@ -168,7 +169,7 @@ def generate_toc_tree(docs_path):
168
169
output = template .render (data = data ) # Pass 'data' as a named argument
169
170
170
171
# 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 :
172
173
file .write (output )
173
174
174
175
Original file line number Diff line number Diff line change 4
4
- name: {{ category.category }}
5
5
items:{% for operator in category .operators %}
6
6
- name: {{ operator.operator_name }}
7
- href: {{ operator.file_name }}{% endfor %}
7
+ href: {{ operator.file_path }}{% endfor %}
8
8
{% endfor %}
You can’t perform that action at this time.
0 commit comments