Skip to content

Commit 75aca5a

Browse files
authored
Merge pull request #65 from handrews/reorg-reg
Organize registries, improve names
2 parents 5f38f11 + 069b916 commit 75aca5a

5 files changed

Lines changed: 19 additions & 7 deletions

File tree

_config.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,36 +18,43 @@ collections:
1818
name: Format Registry
1919
output: true
2020
permalink: /registry/:collection/:title
21+
order: 20
2122
media-type:
2223
slug: media-type
2324
name: Media Type Registry
2425
output: true
2526
permalink: /registry/:collection/:title
27+
order: 40
2628
extension:
29+
order: 10
2730
slug: extension
28-
name: Specification Extension Registry
31+
name: Extension Field Registry
2932
output: true
3033
permalink: /registry/:collection/:title
3134
draft-feature:
3235
slug: draft-feature
3336
name: Draft Features Registry
3437
output: true
3538
permalink: /registry/:collection/:title
39+
order: 50
3640
alternative-schema:
3741
slug: alternative-schema
3842
name: Alternative Schema Type Registry
3943
output: true
4044
permalink: /registry/:collection/:title
45+
order: 100
4146
namespace:
47+
order: 12
4248
slug: namespace
43-
name: Extension Namespace Registry
49+
name: Extension Field Namespace Registry
4450
output: true
4551
permalink: /registry/:collection/:title
4652
tag-kind:
4753
slug: tag-kind
4854
name: Tag Kind Registry
4955
output: true
5056
permalink: /registry/:collection/:title
57+
order: 30
5158
exclude:
5259
- Gemfile
5360
- Gemfile.lock

api/registries.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
title: Registries API
33
parent: API
44
---
5+
{% assign registries = site.collections | sort: 'order' %}
56
[
6-
{% for collection in site.collections %}{% unless collection.hidden %}"{{ collection.slug }}"{% unless forloop.last %}{% comment %}hoping the last registry is not hidden{% endcomment %},{% endunless %}
7+
{% for registry in registries %}{% unless registry.hidden %}"{{ registry.slug }}"{% unless forloop.last %}{% comment %}hoping the last registry is not hidden{% endcomment %},{% endunless %}
78
{% endunless %}{% endfor %}
89
]

index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@ Each specification page lists all published specification versions and official
2424
The [Registry Page](./registry/index.html) includes documentation as well as API and RSS access for all registries
2525

2626
Registry shortcuts:
27-
{% for registry in site.collections %}{% unless registry.hidden %}
27+
28+
{% assign registries = site.collections | sort: 'order' %}
29+
{% for registry in registries %}{% unless registry.hidden %}
2830
* <a href="registry/{{ registry.slug }}">{{ registry.name }}</a>{% endunless %}{% endfor %}

registry/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ Please raise a [Pull-Request](https://github.com/OAI/spec.openapis.org/pulls) ag
1313

1414
### Contents
1515

16-
{% for registry in site.collections %}{% unless registry.hidden %}
16+
{% assign registries = site.collections | sort: 'order' %}
17+
{% for registry in registries %}{% unless registry.hidden %}
1718
* <a href="./{{ registry.slug }}">{{ registry.name }}{% endunless %}{% endfor %}
1819

1920
#### API access
2021

21-
* [registries.json](../api/registries.json) - Registries meta-registry{% for registry in site.collections %}{% unless registry.hidden %}
22+
* [registries.json](../api/registries.json) - Registries meta-registry{% for registry in registries %}{% unless registry.hidden %}
2223
* <a href="../api/{{ registry.slug }}.json">{{ registry.slug }}.json</a>{% endunless %} {% endfor %}
2324

2425
#### RSS feed

rss/feed.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
22
layout: none
33
---
4+
{% assign registries = site.collections | sort: 'order' %}
45
<?xml version="1.0" encoding="UTF-8"?>
56
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
67
<channel>
78
<title>{{ site.title | xml_escape }}</title>
89
<description>{{ site.description | xml_escape }}</description>
910
<link>{{ site.url }}{{ site.baseurl }}/</link>
1011
<atom:link href="{{ "/rss/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml" />
11-
{% for reg in site.collections %}
12+
{% for reg in registries %}
1213
{% if reg.output %}
1314
{% assign name = reg.label %}
1415
{% for value in reg.docs %}

0 commit comments

Comments
 (0)