Skip to content

Commit b7e1c30

Browse files
committed
Fix canonical url
1 parent dce240c commit b7e1c30

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

sphinx_scylladb_theme/layout.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@
5353
<link rel="icon" href="{{ pathto('_static/img/favicon-228x228.png', 1) }}" sizes="192x192" />
5454
<link rel="apple-touch-icon" href="{{ pathto('_static/img/favicon-228x228.png', 1) }}" />
5555
<meta name="msapplication-TileImage" href="{{ pathto('_static/img/favicon-228x228.png', 1) }}" />
56-
<link rel="canonical" href="https://docs.scylladb.com/" />
56+
{% if versions and latest_version %}
57+
{% set latest_slug = rename_latest_version or latest_version.name %}
58+
<link rel="canonical" href="{{ html_baseurl }}/{{latest_slug}}/{{ pagename }}.html"/>
59+
{% else %}
60+
<link rel="canonical" href="{{ html_baseurl }}/{{ pagename }}.html"/>
61+
{% endif %}
5762
<link rel="author" href="mailto:[email protected]" />
5863

5964
{% block css %}

0 commit comments

Comments
 (0)