Skip to content

Commit

Permalink
Set source link for autogenerated docs to their dir
Browse files Browse the repository at this point in the history
  • Loading branch information
abitrolly committed Dec 6, 2024
1 parent 0b64470 commit 70b34cd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/scripts/generate-stories.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ def main() -> None:
logger.info(f'Generating rst files from {area}')

with open(f"{area.lstrip('/')}.rst", 'w') as doc:
# Metadata - https://www.sphinx-doc.org/en/master/usage/restructuredtext/field-lists.html
# Metadata -
# https://www.sphinx-doc.org/en/master/usage/restructuredtext/field-lists.html
doc.write(
':github_url: https://github.com/teemtee/tmt/blob/main/docs/scripts/generate-stories.py'
)
f':github_url: https://github.com/teemtee/tmt/blob/main{area}'
)
doc.write('\n\n')
# Anchor and title
doc.write(f'.. _{area}:\n\n')
Expand Down

0 comments on commit 70b34cd

Please sign in to comment.