Re: [PATCH] docs: set canonical base URL for HTML output

From: Jonathan Corbet

Date: Sun Mar 22 2026 - 16:41:01 EST


Rito Rhymes <rito@xxxxxxxxxxxxxx> writes:

> Set the published docs URL as html_baseurl so generated HTML pages
> advertise the correct canonical URL metadata.
>
> This helps search engines and other consumers treat docs.kernel.org as
> the canonical location for published documentation pages.
>
> Signed-off-by: Rito Rhymes <rito@xxxxxxxxxxxxxx>
> ---
> Documentation/conf.py | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/Documentation/conf.py b/Documentation/conf.py
> index 679861503..f517dfeaf 100644
> --- a/Documentation/conf.py
> +++ b/Documentation/conf.py
> @@ -437,6 +437,9 @@ sys.stderr.write("Using %s theme\n" % html_theme)
> # so a file named "default.css" will overwrite the builtin "default.css".
> html_static_path = ["sphinx-static"]
>
> +# Canonical base URL for generated HTML pages.
> +html_baseurl = "https://docs.kernel.org/";
> +

What problem does this actually solve; what isn't working as well as it
should due to the lack of this configuration?

...and how does it help all of the people who do their own docs builds?

Thanks,

jon