Skip to content

Commit

Permalink
fix: use file name instead of object name for TOC (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
dandhlee committed Aug 17, 2021
1 parent ee89394 commit 48279ef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docfx_yaml/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -1204,8 +1204,11 @@ def convert_module_to_package_if_needed(obj):
'uid': uid
})
else:
# Extract the file name to use for new entries into the TOC
# to make TOC entries consistent with filenames.
file_name = obj['source']['path'].split("/")[-1][:-3]
toc_yaml.append({
'name': node_name,
'name': file_name,
'uidname': uid,
'uid': uid
})
Expand Down

0 comments on commit 48279ef

Please sign in to comment.