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

Registry: Encapsulate page layout #1823

Open
tedepstein opened this issue Feb 4, 2019 · 0 comments
Open

Registry: Encapsulate page layout #1823

tedepstein opened this issue Feb 4, 2019 · 0 comments

Comments

@tedepstein
Copy link
Contributor

tedepstein commented Feb 4, 2019

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.

tedepstein added a commit to RepreZen/OpenAPI-Specification that referenced this issue Feb 4, 2019
…, referring to a page template in the folder.
@MikeRalphson MikeRalphson self-assigned this Apr 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants