Skip to content

Commit d975a55

Browse files
authored
Merge pull request #3828 from Bellangelo/encapsulate-page-layout-for-extensions
Encapsulate page layout for extensions
2 parents 33e0aba + ccbf6a8 commit d975a55

File tree

3 files changed

+22
-14
lines changed

3 files changed

+22
-14
lines changed

_config.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ collections:
2020
extension:
2121
slug: extension
2222
name: Specification Extension Registry
23-
output: false
24-
hidden: true
23+
output: true
2524
permalink: /registry/:collection/:title
2625
draft-feature:
2726
slug: draft-feature

_includes/extension-entry.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# <a href="..">{{ page.collection }}</a>
2+
3+
## {{ page.slug }} - {{ page.description }}
4+
5+
{{ include.summary }}
6+
7+
### Schema
8+
9+
```yaml
10+
{{page.schema}}
11+
```
12+
13+
### Example
14+
15+
{{ include.example }}
16+

registries/_extension/x-twitter.md

+5-12
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,11 @@ objects: [ "contactObject" ]
88
layout: default
99
---
1010

11-
# <a href="..">{{ page.collection }}</a>
12-
13-
## {{ page.slug }} - {{ page.description }}
14-
11+
{% capture summary %}
1512
The `x-twitter` extension is used to hold a reference to the API provider's Twitter account. It can appear as a property in the following objects: `{{page.objects|jsonify}}`.
13+
{% endcapture %}
1614

17-
### Schema
18-
19-
```yaml
20-
{{page.schema}}
21-
```
22-
23-
### Example
24-
15+
{% capture example %}
2516
```yaml
2617
openapi: 3.0.0
2718
info:
@@ -34,4 +25,6 @@ info:
3425
Used by: (informational)
3526
3627
* APIs.guru
28+
{% endcapture %}
3729
30+
{% include extension-entry.md summary=summary example=example %}

0 commit comments

Comments
 (0)