Skip to content

Commit 26adc2b

Browse files
committed
doc: add canonical URL pointing to latest/ for SEO
Set html_baseurl so every page emits a rel="canonical" link to the latest/ copy, telling search engines to prefer the latest docs over older versions and de-duplicating the identical latest/ and 4.0.x/ folders.
1 parent c93caef commit 26adc2b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

doc/conf.py.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ templates_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_templates']
6666
html_theme = 'sphinx_rtd_theme'
6767
html_style = 'css/custom.css'
6868

69+
# Point search engines at the evergreen "latest" build of each page via a
70+
# rel="canonical" link. Setting this in *every* version build (unstable, X.Y.x,
71+
# ...) consolidates ranking signals onto the latest/ docs so they are preferred
72+
# over older versions in search results.
73+
html_baseurl = 'https://triqs.github.io/solid_dmft/latest/'
74+
6975
html_favicon = '@CMAKE_CURRENT_SOURCE_DIR@/logos/favicon.ico'
7076
html_logo = '@CMAKE_CURRENT_SOURCE_DIR@/logos/logo_no_text.png'
7177

0 commit comments

Comments
 (0)