Skip to content

Commit bae59e1

Browse files
authored
Merge pull request #4013 from ralfhandl/gh-pages-oas-version-list
gh-pages: specification version lists on landing page
2 parents 33fff23 + f5d328d commit bae59e1

File tree

5 files changed

+71
-20
lines changed

5 files changed

+71
-20
lines changed

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,23 @@ This site contains the OpenAPI Initiative Registry and content for the HTML vers
44

55
## Registry
66

7-
* Proceed to [Registry](./registry/index.html)
7+
* Proceed to [Registry](https://spec.openapis.org/registry/index.html)
88

99
## OpenAPI Initiative Specifications
1010

11-
| Specification | Markdown Repository | HTML Version |
11+
| Specification | Markdown Repository | Versions |
1212
| :--------------| :------------------ | :------- |
13-
| `OpenAPI Specification` | [View](https://github.com/OAI/OpenAPI-Specification)|[**Latest (3.1.0)**](oas/latest.html), [3.0.3](https://spec.openapis.org/oas/v3.0.3.html), [3.0.2](https://spec.openapis.org/oas/v3.0.2.html), [3.0.1](https://spec.openapis.org/oas/v3.0.1.html), [**3.0.0**](https://spec.openapis.org/oas/v3.0.0.html), [**2.0**](https://spec.openapis.org/oas/v2.0.html)|
14-
| `Arazzo Specification` | [View](https://github.com/OAI/Arazzo-Specification) | [1.0.0](https://spec.openapis.org/arazzo/v1.0.0.html)|
13+
| OpenAPI Specification | [View](https://github.com/OAI/OpenAPI-Specification)|[**3.1.0**](https://spec.openapis.org/oas/v3.1.0.html)<br> [**3.0.3**](https://spec.openapis.org/oas/v3.0.3.html), [3.0.2](https://spec.openapis.org/oas/v3.0.2.html), [3.0.1](https://spec.openapis.org/oas/v3.0.1.html), [3.0.0](https://spec.openapis.org/oas/v3.0.0.html)<br> [**2.0**](https://spec.openapis.org/oas/v2.0.html) |
14+
| Arazzo Specification | [View](https://github.com/OAI/Arazzo-Specification) | [1.0.0](https://spec.openapis.org/arazzo/v1.0.0.html) |
1515

16+
## Development
17+
18+
Install [jekyll](https://jekyllrb.com/docs/installation/) for your platform, install the site
19+
~~~sh
20+
bundle install
21+
~~~
22+
run it
23+
~~~sh
24+
bundle exec jekyll serve --livereload
25+
~~~
26+
and change it to your heart's content :sunglasses:

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ color_scheme: oai
44
title: OpenAPI Initiative Registry
55
description: Extensible data value repository
66
show_downloads: true
7+
excerpt_separator: ""
78
collections_dir: /registries
89
collections:
910
posts:
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{% assign html_files = site.static_files | where: "extname", ".html" | sort: "basename" | reverse %}
2+
{% assign last_version = "" %}
3+
{%- for file in html_files -%}
4+
{%- assign segments = file.path | split: "/" -%}
5+
{%- assign firstchar = file.basename | slice: 0 -%}
6+
{%- if segments[1] == include.specification and firstchar == "v" -%}
7+
{%- assign minor_version = file.basename | slice: 1, 3 -%}
8+
{%- if minor_version != last_version -%}
9+
{% assign last_version = minor_version %}
10+
* **[{{ file.basename }}]({{ site.baseurl }}{{ file.path }})**
11+
{%- else -%}
12+
, [{{ file.basename }}]({{ site.baseurl }}{{ file.path }})
13+
{%- endif -%}
14+
{%- endif -%}
15+
{%- endfor- %}

index.md

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,31 @@ This site contains the OpenAPI Initiative Registry and content for the HTML vers
1212

1313
* Proceed to [Registry](./registry/index.html)
1414

15-
## OpenAPI Initiative Specifications
15+
## Arazzo Specification
1616

17-
| Specification | Markdown Repository | HTML Version |
18-
| :--------------| :------------------ | :------- |
19-
| `OpenAPI Specification` | [View](https://github.com/OAI/OpenAPI-Specification)|[View](oas/latest.html)|
20-
| `Arazzo Specification` | [View](https://github.com/OAI/Arazzo-Specification) | [View](arazzo/latest.html)|
17+
### Versions
18+
19+
{% include specification-version-list.md specification="arazzo" %}
20+
21+
## OpenAPI Specification
22+
23+
### Versions
24+
25+
{% include specification-version-list.md specification="oas" %}
26+
27+
### Non-Normative JSON Schemas
28+
29+
{% assign schema_files = site.static_files | where: "extname", "" | sort: "path" | reverse %}
30+
{% assign last_version = "" %}
31+
{%- for file in schema_files -%}
32+
{%- assign segments = file.path | split: "/" -%}
33+
{%- if segments[1] == "oas" and file.basename contains "lat" -%}
34+
{%- if segments[2] != last_version -%}
35+
{%- assign last_version = segments[2] %}
36+
* **v{{ last_version }}**
37+
{%- assign separator = ": " -%}
38+
{%- endif -%}
39+
{{ separator }}[{{ segments[3] }}]({{ file.path }})
40+
{%- assign separator = ", " -%}
41+
{%- endif -%}
42+
{%- endfor -%}

rss/feed.xml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,19 @@ layout: none
99
<link>{{ site.url }}{{ site.baseurl }}/</link>
1010
<atom:link href="{{ "/rss/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml" />
1111
{% for reg in site.collections %}
12-
{% assign name = reg.label %}
13-
{% for value in site.[name] %}
14-
<item>
15-
<title>{{ value.slug | xml_escape }}</title>
16-
<description>{{ value.description | xml_escape }}</description>
17-
<category>{{ reg.label }}</category>
18-
<pubDate>{% if value.date %}{{ value.date | date: "%a, %d %b %Y %H:%M:%S %z" }}{% else %}{{ 'now' | date: "%a, %d %b %Y %H:%M:%S %z" }}{% endif %}</pubDate>
19-
<link>{{ value.url }}</link>
20-
<guid isPermaLink="true">{{ value.url }}</guid>
21-
</item>
22-
{% endfor %}
12+
{% if reg.output %}
13+
{% assign name = reg.label %}
14+
{% for value in reg.docs %}
15+
<item>
16+
<title>{{ value.slug | xml_escape }}</title>
17+
<description>{{ value.description | xml_escape }}</description>
18+
<category>{{ reg.label }}</category>
19+
<pubDate>{% if value.date %}{{ value.date | date: "%a, %d %b %Y %H:%M:%S %z" }}{% else %}{{ 'now' | date: "%a, %d %b %Y %H:%M:%S %z" }}{% endif %}</pubDate>
20+
<link>{{ value.url }}</link>
21+
<guid isPermaLink="true">{{ value.url }}</guid>
22+
</item>
23+
{% endfor %}
24+
{% endif %}
2325
{% endfor %}
2426
</channel>
2527
</rss>

0 commit comments

Comments
 (0)