From 082e1d150a3e1ab751a0d582a0916cf581a1ffc7 Mon Sep 17 00:00:00 2001 From: Bellangelo Date: Tue, 21 May 2024 00:13:03 +0300 Subject: [PATCH 1/3] Encapsulate page layout for extensions --- _includes/extension-entry.md | 16 ++++++++++++++++ registries/_extension/x-twitter.md | 17 +++++------------ 2 files changed, 21 insertions(+), 12 deletions(-) create mode 100644 _includes/extension-entry.md diff --git a/_includes/extension-entry.md b/_includes/extension-entry.md new file mode 100644 index 0000000000..ee2dd4a504 --- /dev/null +++ b/_includes/extension-entry.md @@ -0,0 +1,16 @@ +# {{ page.collection }} + +## {{ page.slug }} - {{ page.description }} + +{{ include.summary }} + +### Schema + +```yaml +{{page.schema}} +``` + +### Example + +{{ include.example }} + diff --git a/registries/_extension/x-twitter.md b/registries/_extension/x-twitter.md index 0b05ec9910..ca100cc08a 100644 --- a/registries/_extension/x-twitter.md +++ b/registries/_extension/x-twitter.md @@ -8,20 +8,11 @@ objects: [ "contactObject" ] layout: default --- -# {{ page.collection }} - -## {{ 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: @@ -34,4 +25,6 @@ info: Used by: (informational) * APIs.guru +{% endcapture %} +{% include extension-entry.md summary=summary example=example %} From 5821f2a8ba50c44e7697d74e5ae7cd61aef72e6e Mon Sep 17 00:00:00 2001 From: Bellangelo Date: Tue, 21 May 2024 00:21:26 +0300 Subject: [PATCH 2/3] Fix closing tag --- registries/_extension/x-twitter.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registries/_extension/x-twitter.md b/registries/_extension/x-twitter.md index ca100cc08a..6fe0ea333c 100644 --- a/registries/_extension/x-twitter.md +++ b/registries/_extension/x-twitter.md @@ -12,7 +12,7 @@ layout: default 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 %} -{%capture example $} +{% capture example %} ```yaml openapi: 3.0.0 info: From ccbf6a835d78d1bd44b9c21f5820f61437c30849 Mon Sep 17 00:00:00 2001 From: Bellangelo Date: Tue, 21 May 2024 00:33:41 +0300 Subject: [PATCH 3/3] Re-enable page build --- _config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/_config.yml b/_config.yml index 6fd6c75a46..5200d17f38 100644 --- a/_config.yml +++ b/_config.yml @@ -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