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):
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
Original file line number Diff line number Diff line change 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 %}
You can’t perform that action at this time.
0 commit comments