diff --git a/docs/_config.yml b/docs/_config.yml index 9510d6b58..c113e1704 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -6,6 +6,7 @@ url: 'https://sinonjs.org' github_username: sinonjs sinon: current_release: v13.0.0 + current_major_version: 13 markdown: kramdown kramdown: input: GFM diff --git a/docs/_includes/head.html b/docs/_includes/head.html index 4fa8c6052..f0815bb88 100644 --- a/docs/_includes/head.html +++ b/docs/_includes/head.html @@ -12,7 +12,7 @@ {% comment %} To make all documentation pages, regardless of version, lead search traffic to the latest version, - we need to point all the pages under /releases/v*/ to their latest version + we need to point all the pages under /releases/v*/ to the latest version {% endcomment %} {% assign url_parts = page.url | split: "/" %} @@ -20,11 +20,11 @@ {% if page.url contains "/releases/v" } %} {% assign canonical_page_url = "/releases/latest/" | append: url_parts[3] %} - {% if url_parts[2] != {site.sinon.current_release} %} - - {% endif %} + {% else %} {% assign canonical_page_url = page.url | replace:'index.html','' %} {% endif %} diff --git a/docs/_includes/header.html b/docs/_includes/header.html index b6e67f0ec..67430ca00 100644 --- a/docs/_includes/header.html +++ b/docs/_includes/header.html @@ -7,7 +7,7 @@