Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encapsulate page layout for extensions #3828

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ collections:
extension:
slug: extension
name: Specification Extension Registry
output: false
hidden: true
output: true
permalink: /registry/:collection/:title
draft-feature:
slug: draft-feature
Expand Down
16 changes: 16 additions & 0 deletions _includes/extension-entry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# <a href="..">{{ page.collection }}</a>

## {{ page.slug }} - {{ page.description }}

{{ include.summary }}

### Schema

```yaml
{{page.schema}}
```

### Example

{{ include.example }}

17 changes: 5 additions & 12 deletions registries/_extension/x-twitter.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,11 @@ objects: [ "contactObject" ]
layout: default
---

# <a href="..">{{ page.collection }}</a>

## {{ page.slug }} - {{ page.description }}

{% capture summary %}
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}}`.
{% endcapture %}

### Schema

```yaml
{{page.schema}}
```

### Example

{% capture example %}
```yaml
openapi: 3.0.0
info:
Expand All @@ -34,4 +25,6 @@ info:
Used by: (informational)

* APIs.guru
{% endcapture %}

{% include extension-entry.md summary=summary example=example %}