Skip to content

Commit

Permalink
Fix link to latest version of a page
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian Rodriguez <fabian.rodriguez@konghq.com>
  • Loading branch information
fabianrbz committed Feb 26, 2024
1 parent df90f88 commit d1f836b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/_includes/version_alert.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% assign current_release = page.release %}
{% assign latest_version = site.data.latest_version.release %}
{% assign page_path = page.url | split: '/' | shift: 3 | join: '/' %}
{% assign latest_version_path = "docs/" | append: latest_version | append: '/' | append: page_path | append: '.md' %}
{% assign latest_page = site.pages | find: 'path', latest_version_path %}
{% assign latest_version_path = "/docs/" | append: latest_version | append: '/' | append: page_path %}
{% assign latest_page = site.pages | find: 'url', latest_version_path %}

{% if current_release %}
{% unless current_release.latest? %}
Expand Down

0 comments on commit d1f836b

Please sign in to comment.