Skip to content

Commit 831c1e2

Browse files
committed
Download links for all versions
1 parent 272c130 commit 831c1e2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

index.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,20 @@ This site contains the OpenAPI Initiative Registry and content for the HTML vers
2828

2929
{% assign schema_files = site.static_files | where: "extname", "" | sort: "path" | reverse %}
3030
{% assign last_version = "" %}
31+
{% assign last_kind = "" %}
3132
{%- for file in schema_files -%}
3233
{%- assign segments = file.path | split: "/" -%}
33-
{%- if segments[1] == "oas" and file.basename contains "latest" -%}
34+
{%- if segments[1] == "oas" and file.basename contains "-" -%}
3435
{%- if segments[2] != last_version -%}
3536
{%- assign last_version = segments[2] %}
3637
* **v{{ last_version }}**
38+
{%- endif -%}
39+
{%- if segments[3] != last_kind -%}
40+
{%- assign last_kind = segments[3] %}
41+
* [**{{ last_kind }}**]({{ site.baseurl }}/oas/{{ last_version }}/{{ last_kind }}/latest.html)
3742
{%- assign separator = ": " -%}
3843
{%- endif -%}
39-
{{ separator }}[{{ segments[3] }}]({{ site.baseurl }}{{ file.path }}.html) ([download]({{ site.baseurl }}{{ file.path }}))
44+
{{ separator }} [{{ file.basename }}]({{ site.baseurl }}{{ file.path }})
4045
{%- assign separator = ", " -%}
4146
{%- endif -%}
4247
{%- endfor %}

0 commit comments

Comments
 (0)