Skip to content

Commit

Permalink
doc/integration: add canonical URLs for the other doc sets
Browse files Browse the repository at this point in the history
To let Google know that these are copies of the original doc
sets, add a rel="canonical" link element (see
https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls ).

This is achieved by setting Sphinx's `html_baseurl` configuration.

Signed-off-by: Ruth Fuchss <[email protected]>
  • Loading branch information
ru-fu committed Aug 20, 2024
1 parent 3c80d2c commit 9b5d0fd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions doc/.sphinx/_integration/add_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,10 @@

# Add the search JavaScript file
custom_html_js_files.append('rtd-search.js')

if project == "LXD":
html_baseurl = "https://documentation.ubuntu.com/lxd/en/latest/"
elif project == "MicroCeph":
html_baseurl = "https://canonical-microceph.readthedocs-hosted.com/en/latest/"
elif project == "MicroOVN":
html_baseurl = "https://canonical-microovn.readthedocs-hosted.com/en/latest/"

0 comments on commit 9b5d0fd

Please sign in to comment.