From e1000bea98583a3eaa66107328365eb982a43458 Mon Sep 17 00:00:00 2001 From: geoffreynyaga Date: Mon, 16 Jun 2025 10:21:55 +0300 Subject: [PATCH 1/2] sitemap config --- docs/.sphinx/requirements.txt | 1 + docs/conf.py | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/.sphinx/requirements.txt b/docs/.sphinx/requirements.txt index 479ade97a9..ee0598a11a 100644 --- a/docs/.sphinx/requirements.txt +++ b/docs/.sphinx/requirements.txt @@ -2,3 +2,4 @@ canonical-sphinx[full] @ git+https://github.com/canonical/canonical-sphinx@main sphinx-autobuild sphinxcontrib-svg2pdfconverter[CairoSVG] sphinx-last-updated-by-git +sphinx-sitemap diff --git a/docs/conf.py b/docs/conf.py index 07fefa1ede..46c6f49771 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,7 +26,7 @@ project = "Multipass" author = "Canonical Ltd." -#root_doc = "src/index" +# root_doc = "src/index" # Sidebar documentation title; best kept reasonably short # @@ -72,6 +72,7 @@ ogp_site_url = "https://documentation.ubuntu.com/multipass" +html_baseurl = "https://documentation.ubuntu.com/multipass/en/latest/" # for sitemap.xml, the trailing slash is important # Preview name of the documentation website # @@ -162,7 +163,7 @@ # TODO: If your documentation is hosted on https://docs.ubuntu.com/, # uncomment and update as needed. -slug = 'multipass' +slug = "multipass" # Template and asset locations @@ -196,7 +197,7 @@ # TODO: Remove or adjust the ACME entry after you update the contributing guide linkcheck_ignore = [ - "https://app.element.io/#/room/#Multipass:matrix.org", + "https://app.element.io/#/room/#Multipass:matrix.org", "http://127.0.0.1:8000", "http://127.0.0.1:8001", "https://localhost:8080", @@ -205,8 +206,8 @@ "https://sourceforge.net/projects/vcxsrv/", "https://sourceforge.net/projects/xming/", "http://www.straightrunning.com/XmingNotes/", - "https://unix.stackexchange.com", # it seems stackexchange is now blocking bots - ] + "https://unix.stackexchange.com", # it seems stackexchange is now blocking bots +] linkcheck_retries = 3 @@ -250,6 +251,7 @@ "canonical_sphinx", "sphinxcontrib.cairosvgconverter", "sphinx_last_updated_by_git", + "sphinx_sitemap", ] # Excludes files or directories from processing From 439ca87a51480e9a68e3597b7cda653c6b212730 Mon Sep 17 00:00:00 2001 From: geoffreynyaga Date: Thu, 19 Jun 2025 10:44:54 +0300 Subject: [PATCH 2/2] fix language and version --- docs/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 46c6f49771..554c2e89a8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -72,7 +72,8 @@ ogp_site_url = "https://documentation.ubuntu.com/multipass" -html_baseurl = "https://documentation.ubuntu.com/multipass/en/latest/" # for sitemap.xml, the trailing slash is important +html_baseurl = "https://documentation.ubuntu.com/multipass/" # for sitemap.xml, the trailing slash is important +sitemap_url_scheme = "en/latest/{link}" # Preview name of the documentation website #