diff --git a/README.md b/README.md index 51c3890e5f..d4c84a073b 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,23 @@ This site contains the OpenAPI Initiative Registry and content for the HTML vers ## Registry -* Proceed to [Registry](./registry/index.html) +* Proceed to [Registry](https://spec.openapis.org/registry/index.html) ## OpenAPI Initiative Specifications -| Specification | Markdown Repository | HTML Version | +| Specification | Markdown Repository | Versions | | :--------------| :------------------ | :------- | -| `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)| -| `Arazzo Specification` | [View](https://github.com/OAI/Arazzo-Specification) | [1.0.0](https://spec.openapis.org/arazzo/v1.0.0.html)| +| OpenAPI Specification | [View](https://github.com/OAI/OpenAPI-Specification)|[**3.1.0**](https://spec.openapis.org/oas/v3.1.0.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) | +| Arazzo Specification | [View](https://github.com/OAI/Arazzo-Specification) | [1.0.0](https://spec.openapis.org/arazzo/v1.0.0.html) | +## Development + +Install [jekyll](https://jekyllrb.com/docs/installation/) for your platform, install the site +~~~sh +bundle install +~~~ +run it +~~~sh +bundle exec jekyll serve --livereload +~~~ +and change it to your heart's content :sunglasses: diff --git a/_config.yml b/_config.yml index 0fd1edf509..15d4ce98aa 100644 --- a/_config.yml +++ b/_config.yml @@ -4,6 +4,7 @@ color_scheme: oai title: OpenAPI Initiative Registry description: Extensible data value repository show_downloads: true +excerpt_separator: "" collections_dir: /registries collections: posts: diff --git a/_includes/specification-version-list.md b/_includes/specification-version-list.md new file mode 100644 index 0000000000..c141f93f3c --- /dev/null +++ b/_includes/specification-version-list.md @@ -0,0 +1,15 @@ +{% assign html_files = site.static_files | where: "extname", ".html" | sort: "basename" | reverse %} +{% assign last_version = "" %} +{%- for file in html_files -%} +{%- assign segments = file.path | split: "/" -%} +{%- assign firstchar = file.basename | slice: 0 -%} +{%- if segments[1] == include.specification and firstchar == "v" -%} +{%- assign minor_version = file.basename | slice: 1, 3 -%} +{%- if minor_version != last_version -%} +{% assign last_version = minor_version %} +* **[{{ file.basename }}]({{ site.baseurl }}{{ file.path }})** +{%- else -%} +, [{{ file.basename }}]({{ site.baseurl }}{{ file.path }}) +{%- endif -%} +{%- endif -%} +{%- endfor- %} diff --git a/index.md b/index.md index efa2a4c197..3798a9a22c 100644 --- a/index.md +++ b/index.md @@ -12,9 +12,31 @@ This site contains the OpenAPI Initiative Registry and content for the HTML vers * Proceed to [Registry](./registry/index.html) -## OpenAPI Initiative Specifications +## Arazzo Specification -| Specification | Markdown Repository | HTML Version | -| :--------------| :------------------ | :------- | -| `OpenAPI Specification` | [View](https://github.com/OAI/OpenAPI-Specification)|[View](oas/latest.html)| -| `Arazzo Specification` | [View](https://github.com/OAI/Arazzo-Specification) | [View](arazzo/latest.html)| +### Versions + +{% include specification-version-list.md specification="arazzo" %} + +## OpenAPI Specification + +### Versions + +{% include specification-version-list.md specification="oas" %} + +### Non-Normative JSON Schemas + +{% assign schema_files = site.static_files | where: "extname", "" | sort: "path" | reverse %} +{% assign last_version = "" %} +{%- for file in schema_files -%} +{%- assign segments = file.path | split: "/" -%} +{%- if segments[1] == "oas" and file.basename contains "lat" -%} +{%- if segments[2] != last_version -%} +{%- assign last_version = segments[2] %} +* **v{{ last_version }}** +{%- assign separator = ": " -%} +{%- endif -%} +{{ separator }}[{{ segments[3] }}]({{ file.path }}) +{%- assign separator = ", " -%} +{%- endif -%} +{%- endfor -%} diff --git a/rss/feed.xml b/rss/feed.xml index f43e1043bb..9c053c4410 100644 --- a/rss/feed.xml +++ b/rss/feed.xml @@ -9,17 +9,19 @@ layout: none {{ site.url }}{{ site.baseurl }}/ {% for reg in site.collections %} - {% assign name = reg.label %} - {% for value in site.[name] %} - - {{ value.slug | xml_escape }} - {{ value.description | xml_escape }} - {{ reg.label }} - {% 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 %} - {{ value.url }} - {{ value.url }} - - {% endfor %} + {% if reg.output %} + {% assign name = reg.label %} + {% for value in reg.docs %} + + {{ value.slug | xml_escape }} + {{ value.description | xml_escape }} + {{ reg.label }} + {% 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 %} + {{ value.url }} + {{ value.url }} + + {% endfor %} + {% endif %} {% endfor %}