From 69cf09ef90ec7afa30eb07c3b7cdce68ef04b6a2 Mon Sep 17 00:00:00 2001 From: James Frost Date: Fri, 24 May 2024 15:55:16 +0100 Subject: [PATCH] Add html_baseurl to sphinx conf.py This is used to set the tag that points to the canonical version of the webpage. Including this indicates to search engines which version to include in their indexes, and should prevent older versions showing up. Fixes https://github.com/pytest-dev/pytest/issues/12363 --- doc/en/conf.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/en/conf.py b/doc/en/conf.py index e64931ae5..d96db61ea 100644 --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -312,6 +312,9 @@ html_show_sourcelink = False # Output file base name for HTML help builder. htmlhelp_basename = "pytestdoc" +# The base URL which points to the root of the HTML documentation. It is used +# to indicate the location of document using the canonical link relation. +html_baseurl = "https://docs.pytest.org/en/stable/" # -- Options for LaTeX output --------------------------------------------------