mirror of
https://github.com/jupyter/notebook.git
synced 2025-04-06 13:50:29 +08:00
Use correct canonical URL while building docs (#6829)
As noted in https://github.com/readthedocs/readthedocs.org/pull/10224 with the current configuration the canonical URL is wrong with different sphinx builds. For instance the "latest" docs point to "stable". This leads to apps like Mastodon to generate previews to pages which don't exist since they rely on <link rel="canonical" href="https://jupyter-notebook.readthedocs.io/en/stable/notebook_7_features.html" /> This should fix that.
This commit is contained in:
parent
2f9aa01a8f
commit
6e60c72ead
@ -265,6 +265,11 @@ html_static_path = ["_static"]
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = "JupyterNotebookdoc"
|
||||
|
||||
# This will ensure that we use the correctly set environment for canonical URLs
|
||||
# Old Read the Docs injections makes it point only to the default version,
|
||||
# for instance /en/stable/
|
||||
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "/")
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_elements = {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user