File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1111
1212for path in sorted ((src / "stagpy" ).rglob ("*.py" )):
1313 module_path = path .relative_to (src ).with_suffix ("" )
14- doc_path = path . relative_to ( src ) .with_suffix (".md" )
14+ doc_path = module_path .with_suffix (".md" )
1515
1616 parts = module_path .parts
1717
1818 if parts [- 1 ] == "__init__" :
1919 parts = parts [:- 1 ]
20- doc_path = doc_path .with_name ("index.md" )
21-
22- full_doc_path = Path ("reference" , doc_path )
20+ doc_path = doc_path .with_stem ("index" )
2321
2422 if any (p .startswith ("_" ) for p in parts ):
2523 continue
2624
2725 nav [parts ] = doc_path .as_posix ()
2826
27+ full_doc_path = Path ("reference" , doc_path )
2928 with mkdocs_gen_files .open (full_doc_path , "w" ) as fd :
3029 identifier = "." .join (parts )
3130 print ("::: " + identifier , file = fd )
You can’t perform that action at this time.
0 commit comments