Skip to content

Commit 8be538d

Browse files
committed
Add redirect stuff to conf.py
1 parent d36411c commit 8be538d

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

docs/source/conf.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,3 +233,14 @@
233233
autodoc_default_options = {
234234
'show-inheritance': True,
235235
}
236+
237+
# 1. The base URL of your new site
238+
html_baseurl = 'https://www.torchio.org/'
239+
240+
# 2. Tell Sphinx to dump extra <head> tags verbatim
241+
html_extrahead = [
242+
# the trailing slash on pagename is handled automatically
243+
'<link rel="canonical" href="{base}{{{{ pathto(pagename, 1) }}}}{{{{ pagename }}}}.html" />'.format(
244+
base=html_baseurl
245+
)
246+
]

0 commit comments

Comments
 (0)