Skip to content

Commit 082e1d1

Browse files
committed
Encapsulate page layout for extensions
1 parent 7ec03d3 commit 082e1d1

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

_includes/extension-entry.md

Lines changed: 16 additions & 0 deletions
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

Lines changed: 5 additions & 12 deletions
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)