Skip to content

1.1: update site's extensions page + announce release date #1328

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

Merged
merged 12 commits into from
Dec 3, 2018
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
38 changes: 35 additions & 3 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,26 @@ whitelist:
- jekyll-sitemap
- jekyll-feed
- jekyll-seo-tag
- jekyll-gist
- jemoji
incremental: false
gist:
noscript: false

# customize github pages
quiet: false
markdown: kramdown
highlighter: rouge
kramdown:
input: GFM
hard_wrap: false
auto_ids: false
auto_ids: true
auto_id_prefix: auto-id-
auto_id_stripping: true
template: '' # cannot customize
math_engine: mathjax # cannot customize
syntax_highligher: rouge # cannot customize

gems:
plugins:
- jekyll-redirect-from

exclude:
Expand All @@ -48,6 +50,9 @@ port: 9876
collections:
format:
output: true
profiles:
output: true
permalink: /:collection/:path

defaults:
- scope:
Expand All @@ -57,9 +62,27 @@ defaults:
layout: page
show_sidebar: true
is_spec_page: true
- scope:
path: ""
type: "profiles"
values:
layout: profile_error
is_spec_page: false
show_sidebar: false
- scope:
path: "*/*/*/index.md"
type: "profiles"
values:
layout: profile
is_spec_page: false
show_sidebar: true

latest_version: 1.0
excerpt_separator: ""
announcement: |
**[JSON:API v1.1 RC1](/format/1.1/) has been published!** Please review and
try out this upcoming version of the spec before its planned release date of
January 31, 2019.

navigation:
- title: JSON API
Expand All @@ -84,3 +107,12 @@ quicklinks:
url: /format/
- title: Contribute on GitHub
url: https://github.com/json-api/json-api

profile_categories:
- Pagination
# these are some other potential categories.
# Uncomment them if you're adding a profile in one of these categories.
# - Filtering
# - Actions/Hypermedia
# - Data Modeling
# - Deep Querying
19 changes: 13 additions & 6 deletions _format/1.1/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
version: 1.1
status: rc
release_date: 2019-01-31
---

## <a href="#introduction" id="introduction" class="headerlink"></a> Introduction
Expand Down Expand Up @@ -234,7 +236,7 @@ other and with `type` and `id`. In other words, a resource can not have an
attribute and relationship with the same name, nor can it have an attribute
or relationship named `type` or `id`.

#### <a href="#document-resource-object-attributes" id="document-resource-object-attributes" class="headerlink"></a> Attributes
##### <a href="#document-resource-object-attributes" id="document-resource-object-attributes" class="headerlink"></a> Attributes

The value of the `attributes` key **MUST** be an object (an "attributes
object"). Members of the attributes object ("attributes") represent information
Expand All @@ -253,7 +255,7 @@ alongside other information to be represented in a resource object, these keys

> Note: See [fields] and [member names] for more restrictions on this container.

#### <a href="#document-resource-object-relationships" id="document-resource-object-relationships" class="headerlink"></a> Relationships
##### <a href="#document-resource-object-relationships" id="document-resource-object-relationships" class="headerlink"></a> Relationships

The value of the `relationships` key **MUST** be an object (a "relationships
object"). Members of the relationships object ("relationships") represent
Expand Down Expand Up @@ -285,7 +287,7 @@ data, not the related resources.

> Note: See [fields] and [member names] for more restrictions on this container.

#### <a href="#document-resource-object-related-resource-links" id="document-resource-object-related-resource-links" class="headerlink"></a> Related Resource Links
##### <a href="#document-resource-object-related-resource-links" id="document-resource-object-related-resource-links" class="headerlink"></a> Related Resource Links

A "related resource link" provides access to [resource objects][resource objects] [linked][links]
in a [relationship][relationships]. When fetched, the related resource object(s)
Expand All @@ -300,7 +302,7 @@ relationship isn't currently associated with any target resources. Additionally,
a related resource link **MUST NOT** change because its relationship's content
changes.

#### <a href="#document-resource-object-linkage" id="document-resource-object-linkage" class="headerlink"></a> Resource Linkage
##### <a href="#document-resource-object-linkage" id="document-resource-object-linkage" class="headerlink"></a> Resource Linkage

Resource linkage in a [compound document] allows a client to link together all
of the included [resource objects] without having to `GET` any URLs via [links].
Expand Down Expand Up @@ -1920,10 +1922,10 @@ request is received, a server **SHOULD** attempt to apply the requested profiles
to its response.

For example, in the following request, the client asks that the server apply the
`http://jsonapi.org/extensions/last-modified` profile if it is able to.
`http://example.com/last-modified` profile if it is able to.

```http
Accept: application/vnd.api+json;profile="http://example.com/extensions/last-modified", application/vnd.api+json
Accept: application/vnd.api+json;profile="http://example.com/last-modified", application/vnd.api+json
```

> Note: The second instance of the JSON:API media type in the example above is
Expand Down Expand Up @@ -2257,6 +2259,11 @@ supported as well.
3. alter the JSON structure of any concept defined in this specification,
including to allow a superset of JSON structures.


> If you create your own profile, you are **strongly encouraged to [register](/extensions/#profile-registration)
> it** with the JSON API [profile registry](/extensions/), so that others can
> find and reuse it.

#### <a href="#profiles-updating" id="profiles-updating" class="headerlink"></a> Revising a Profile

Profiles **MAY** be revised over time, e.g., to add new capabilities. However,
Expand Down
19 changes: 6 additions & 13 deletions _format/upcoming/index.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
---
is_upcoming_version: true
# Note: We have to do a `redirect_to` here rather than a redirect_from
# in the file for the latest spec version, as the latter causes jekyll
# generate a redirect to `/format/{version}/index.html`, which is an ugly
# and non-canonical url, and jekyll's url config settings aren't flexible
# enough to prevent this.
redirect_to: /format/1.1/
---
{% for spec_draft in site.format %}
{% if spec_draft.version > site.latest_version and spec_draft.path contains 'index' %}
{% comment %}
The line below must be outdented (ugly as that is) or it will be parsed
differently, since indentation can be significant in markdown (e.g. to
indicate code blocks).
{% endcomment %}

{{ spec_draft.content }}

{% endif %}
{% endfor %}
32 changes: 32 additions & 0 deletions _includes/global_head_assets.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<meta charset="utf-8">
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="/stylesheets/normalize.css" rel="stylesheet" type="text/css" />
<link href="/stylesheets/all.css" rel="stylesheet" type="text/css" />
<link href="/stylesheets/print.css" media="print" rel="stylesheet" type="text/css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="/javascripts/all.js" type="text/javascript"></script>
<script src="/javascripts/highlight.pack.js"></script>
<script>hljs.configure({classPrefix: ''}); hljs.initHighlightingOnLoad();</script>

<link rel="apple-touch-icon" sizes="57x57" href="/alt-favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/alt-favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/alt-favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/alt-favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/alt-favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/alt-favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/alt-favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/alt-favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/alt-favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="/alt-favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/alt-favicons/favicon-194x194.png" sizes="194x194">
<link rel="icon" type="image/png" href="/alt-favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="/alt-favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="/alt-favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="/alt-favicons/manifest.json">
<link rel="mask-icon" href="/alt-favicons/safari-pinned-tab.svg" color="#0b4e22">
<link rel="shortcut icon" href="/favicon.ico">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-TileImage" content="/alt-favicons/mstile-144x144.png">
<meta name="msapplication-config" content="/alt-favicons/browserconfig.xml">
<meta name="theme-color" content="#0b4e22">
23 changes: 23 additions & 0 deletions _includes/global_html_footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<footer>
<div class="site-wrapper">
<span>Built with <a href="https://jekyllrb.com/">Jekyll</a> and <a href="http://softwaremaniacs.org/soft/highlight/en/">Highlight.js</a></span>
<span class="license">
<a rel="license" href="https://creativecommons.org/publicdomain/zero/1.0/"><img src="https://licensebuttons.net/p/zero/1.0/88x31.png" style="border- style: none;" alt="CC0" /></a>
</span>
<span class="social-links">
<a class="twitter" href="https://twitter.com/jsonapi"><i class="icon-twitter"></i><span>Twitter</span></a>
<a class="github" href="https://github.com/json-api"><i class="icon-github"></i><span>GitHub</span></a>
<a class="forum" href="https://discuss.jsonapi.org"><i class="icon-forum"></i><span>Discussion Forum</span></a>
</span>
</div>
</footer>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-40609539-1', 'jsonapi.org');
ga('send', 'pageview');

</script>
33 changes: 33 additions & 0 deletions _includes/header_offset_2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{% comment %}
When we embed the markdown from a user-provided profile specification
inside the profile layout, we need to increment each heading level by 2.
Kramdown, our markdown parser, provides a `header_offset` option, but
Jekyll only allows us to set that globally -- and setting it globally
to two would break our other pages. So, this include lets us take arbitrary
HTML (from rendered markdown) and does some liquid string replacements
to offset its headings. This is pretty janky (even more so because liquid
only allows us to do literal string replacement, not regex replacement),
but I think it *should* work robustly, thanks to the fact that angle
brackets (i.e., `<` and `>`) aren't supposed to appear in HTML unencoded,
and I imagine Kramdown respects that.
{% endcomment %}
{{ include.content
| replace: "<h5", "<h6x"
| replace: "<h4", "<h6x"
| replace: "<h3", "<h5x"
| replace: "<h2", "<h4x"
| replace: "<h1", "<h3x"
| replace: "</h1>", "</h3x>"
| replace: "</h2>", "</h4x>"
| replace: "</h3>", "</h5x>"
| replace: "</h4>", "</h6x>"
| replace: "</h5>", "</h6x>"
| replace: "<h3x", "<h3"
| replace: "<h4x", "<h4"
| replace: "<h5x", "<h5"
| replace: "<h6x", "<h6"
| replace: "</h3x>", "</h3>"
| replace: "</h4x>", "</h4>"
| replace: "</h5x>", "</h5>"
| replace: "</h6x>", "</h6>"
}}
5 changes: 5 additions & 0 deletions _includes/profile_url.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% comment %}
Takes the page object for a JSON:API profile spec and returns its url.
This file can't have whitespace outside this comment block or else the
output will be corrupted.
{% endcomment %}{{ include.page.url | absolute_url | split: "/" | where_exp: "item", "item != 'index'" | join: "/" }}/
13 changes: 13 additions & 0 deletions _includes/site_navigation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<nav class="site-nav">
<div class="nav-inner">
<ul>
{% assign url = page.url|remove:'index.html' %}
{% for link in site.navigation %}
<li {% if url == link.url or url contains "/profiles/" and link.url contains "/extensions" %}class="active"{% endif %}><a href="{{link.url}}" title="{{link.title}}">{{link.title}}</a></li>
{% endfor %}
<li class="version">
<a href="/format/#status" class="pill">v{{ site.latest_version }} <span class="stable">Stable</span></a>
</li>
</ul>
</div>
</nav>
29 changes: 16 additions & 13 deletions _includes/status.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,37 @@

{% assign version = include.version %}
{% assign is_latest_version_page = include.is_latest_version %}
{% assign is_upcoming_version_page = include.is_upcoming_version %}
{% assign status = include.status %}

## <a href="#status" id="status" class="headerlink"></a> Status

{% comment %}
The first paragraph in each case, below, aims to explain what content
the page holds and how that may (or may not) change over time.
The first paragraph in each case below aims to explain what content
the page holds and whether that content is finalized.

Note: all the text below must be outdented and markdownified where it's
included for it to be rendered correctly as markdown.
{% endcomment %}

{% if is_latest_version_page %}
This page represents the latest published version of JSON:API, which is
This page presents the latest published version of JSON:API, which is
currently version {{ site.latest_version }}. New versions of JSON:API **will
always be backwards compatible** using a _never remove, only add_ strategy.
Additions can be proposed in our [discussion forum](http://discuss.jsonapi.org/).

{% elsif is_upcoming_version_page %}
This page represents the **working draft** for the next version of JSON:API,
which is currently expected to be {{ site.latest_version|plus:0.1 }}.

{% elsif version and version > site.latest_version %}
This page will always present the most recent text for JSON:API
v{{ site.latest_version|plus:0.1 }}. Currently, version
{{ site.latest_version|plus:0.1 }} is **still a draft**, so this text is
provisional.
This page will always present the most recent text for JSON:API v{{ site.latest_version|plus:0.1 }}.
Version {{ site.latest_version|plus:0.1 }} is a **{% if status == "rc" %}release
candidate{% else %}working draft{% endif %}**. As such, the content on this
page {% if status != "rc" %}is subject to change.{% else %}is unlikely to
change. However, some changes may still occur if implementation experience
proves that they are necessary before this version is finalized.{% endif %}

{% if include.release_date %}
This version is expected to be finalized and released on **{{ include.release_date | date: "%B %e, %Y" }}**
(provided there are two compliant implementations by that date; if not the
release will wait until such implementations exist to prove its viability).
{% endif %}

{% elsif version and version == site.latest_version %}
This page presents an archived copy of JSON:API version {{ version }}. None
Expand All @@ -44,7 +48,6 @@
of the normative text on this page will change. While {{ version }} is no
longer the [latest version](/format/) of JSON:API, **new versions will remain
compatible with this one**, as JSON:API uses a _never remove, only add_ strategy.

{% endif %}

{% comment %}
Expand Down
4 changes: 0 additions & 4 deletions _includes/title_for_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,10 @@
{% endcomment %}
{% assign version = include.version %}
{% assign is_latest_version_page = include.is_latest_version %}
{% assign is_upcoming_version_page = include.is_upcoming_version %}

{% if is_latest_version_page %}
Latest Specification (v{{ site.latest_version }})

{% elsif is_upcoming_version_page %}
Draft for Next Specification Release

{% elsif version and version > site.latest_version %}
Specification v{{site.latest_version|plus:0.1}} (Still in Development)

Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy