Skip to content

Commit

Permalink
docs/conf: add ExtLinks
Browse files Browse the repository at this point in the history
Signed-off-by: Unai Martinez-Corral <[email protected]>
  • Loading branch information
umarcor committed Mar 9, 2022
1 parent 4983a34 commit f0b91db
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#sys.path.insert(0, os.path.abspath('.'))

# -- General configuration -----------------------------------------------------
# -- General configuration ---------------------------------------------------------------------------------------------

project = 'F4PGA'
basic_filename = 'f4pga-docs'
Expand All @@ -19,6 +19,7 @@
release = '' # The full version, including alpha/beta/rc tags.

extensions = [
'sphinx.ext.extlinks',
'sphinx.ext.intersphinx',
'sphinx_verilog_domain',
'sphinxcontrib.images',
Expand Down Expand Up @@ -52,7 +53,7 @@
:format: html
"""

# -- Options for HTML output ---------------------------------------------------
# -- Options for HTML output -------------------------------------------------------------------------------------------

html_show_sourcelink = True

Expand All @@ -71,7 +72,7 @@
html_logo = str(Path(html_static_path[0]) / 'logo.svg')
html_favicon = str(Path(html_static_path[0]) / 'favicon.svg')

# -- Options for LaTeX output --------------------------------------------------
# -- Options for LaTeX output ------------------------------------------------------------------------------------------

latex_documents = [
('index', basic_filename+'.tex', project,
Expand Down Expand Up @@ -104,7 +105,7 @@
'''
}

# -- Options for manual page output --------------------------------------------
# -- Options for manual page output ------------------------------------------------------------------------------------

man_pages = [
('index', basic_filename, project,
Expand All @@ -121,3 +122,14 @@
"prjxray": ("https://f4pga.readthedocs.io/projects/prjxray/en/latest/", None),
"vtr": ("https://docs.verilogtorouting.org/en/latest/", None),
}

# -- Sphinx.Ext.ExtLinks -----------------------------------------------------------------------------------------------

extlinks = {
'wikipedia': ('https://en.wikipedia.org/wiki/%s', 'wikipedia:'),
'gh': ('https://github.com/%s', 'gh:'),
'ghsharp': ('https://github.com/chipsalliance/f4pga/issues/%s', '#'),
'ghissue': ('https://github.com/chipsalliance/f4pga/issues/%s', 'issue #'),
'ghpull': ('https://github.com/chipsalliance/f4pga/pull/%s', 'pull request #'),
'ghsrc': ('https://github.com/chipsalliance/f4pga/blob/master/%s', '')
}

0 comments on commit f0b91db

Please sign in to comment.