Skip to content

Registry: Encapsulate page layout #1823

@tedepstein

Description

@tedepstein

The draft registry is built with Jekyll collections. Each item in the collection, representing a registry entry, is a markdown file containing machine-readable properties in YAML front matter, followed by the content of the registry entry page. Here's an example of an Alternative Schema registry entry:

---
owner: darrelmiller
issue: 1532
description: JSON Schema
layout: default
---

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

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

The `{{ page.slug }}` `alternativeSchema` `type` refers to [JSON Schema](http://json-schema.org/) in any version.

{% if page.issue %}
### GitHub Issue

* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
{% endif %}

We agreed on a recent TSC call that we'd like to better encapsulate the layout for registry entry pages. There are several benefits:

  • It's less boilerplate code that contributors have to copy-and-paste into a new registry entry.
  • It's easier for TSC reviewers to verify that the submission is correct and conformant.
  • This ensures that we see a uniform layout on all registry entry pages.
  • It's easy for us to update the layout of all entries in a given registry (i.e. a given Jekyll collection) without having to edit individual registry entries.

This seems to be easy to solve with Jekyll {% include %} tags, described here.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions