Skip to content

Commit

Permalink
Add support for linking usernames.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Aug 29, 2024
1 parent 0c326f3 commit 2beb8b0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,13 @@
# Preserve authored syntax for defaults
autodoc_preserve_defaults = True

# Add support for linking usernames, PyPI projects, Wikipedia pages
github_url = 'https://github.com/'
extlinks = {
'user': (f'{github_url}%s', '@%s'),
'pypi': ('https://pypi.org/project/%s', '%s'),
'wiki': ('https://wikipedia.org/wiki/%s', '%s'),
}
extensions += ['sphinx.ext.extlinks']

# local

0 comments on commit 2beb8b0

Please sign in to comment.