From f2930d1ad04fd9102934969bb6bb1e2ddf573723 Mon Sep 17 00:00:00 2001 From: Henry Andrews Date: Mon, 27 Nov 2017 12:25:42 -0800 Subject: [PATCH 1/2] Align page and file names It has long annoyed me that our page names and filenames don't match. I open specification-links.md when I mean to open documentation.md probably half the time at least. * Update "gems" to "plugins" to get jekyll to stop complaining * Add the redirect plugin * Rename documentation.md to specification.md and add a redirect * Change the title of implementations.md to Implementations Remove most remaining links to ".md" URIs and standardize on ".html" which seems to be what we've been going for. I think there are still example links with ".md" but I did not want to touch the examples at all for now. --- _config.yml | 5 +++-- implementations.md | 2 +- index.md | 6 +++--- specification-links.md | 2 +- documentation.md => specification.md | 2 ++ 5 files changed, 10 insertions(+), 7 deletions(-) rename documentation.md => specification.md (97%) diff --git a/_config.yml b/_config.yml index 71a91b24..fc5987f5 100644 --- a/_config.yml +++ b/_config.yml @@ -27,7 +27,7 @@ markdown: kramdown theme: minima header_pages: -- documentation.md +- specification.md - examples.md - implementations.md @@ -36,5 +36,6 @@ exclude: - Gemfile - node_modules -gems: +plugins: - jekyll-relative-links + - jekyll-redirect-from diff --git a/implementations.md b/implementations.md index 2a7e1bc0..ce242c00 100644 --- a/implementations.md +++ b/implementations.md @@ -1,6 +1,6 @@ --- layout: page -title: Software +title: Implementations permalink: /implementations.html --- diff --git a/index.md b/index.md index f220d257..0160e069 100644 --- a/index.md +++ b/index.md @@ -4,7 +4,7 @@ title: JSON Schema permalink: / --- -***Draft-07 has been [published](documentation.md)!*** +***Draft-07 has been [published](specification.html)!*** {: style="color:gray; font-size: 150%; text-align: center;"} **JSON Schema** is a vocabulary that allows you to **annotate** and **validate** JSON documents. @@ -86,9 +86,9 @@ More Interested? Check out: -- the [specification](documentation.md) +- the [specification](specification.html) - some [examples](examples.md) -- the growing list of [JSON (Hyper-)Schema software](implementations.md) +- the growing list of [JSON (Hyper-)Schema software](implementations.html) We encourage updating to the latest specification, as described by the draft-07 meta-schemas. However, if you are still using draft-04, you may be interested in: - this [excellent guide](http://spacetelescope.github.io/understanding-json-schema/) for schema authors, from the [Space Telescope Science Institute](http://www.stsci.edu/) diff --git a/specification-links.md b/specification-links.md index 11ff71d0..bf2387eb 100644 --- a/specification-links.md +++ b/specification-links.md @@ -5,7 +5,7 @@ layout: page -You can find the latest released draft on the [Specification](/documentation.md) page. Older drafts are expired, but may be of historical interest. +You can find the latest released draft on the [Specification](/specification.html) page. Older drafts are expired, but may be of historical interest. **A note on draft naming and numbering:** IETF Internet-Drafts (I-Ds) are named with the editor's name and a sequential number which resets with each new editor. Meta-schemas are numbered sequentially. Additionally, drafts 00-03 used one document for all three current specs. Most people find it easier to remember the sequential meta-schema numbers, so those are used throughout the site. diff --git a/documentation.md b/specification.md similarity index 97% rename from documentation.md rename to specification.md index 98b2ea13..ba2f0cf3 100644 --- a/documentation.md +++ b/specification.md @@ -1,5 +1,7 @@ --- layout: page +redirect_from: "/documentation.html" +permalink: /specification.html title: Specification --- From 247195f21776057354b4bf9cbb9c010d7327bd62 Mon Sep 17 00:00:00 2001 From: Henry Andrews Date: Mon, 27 Nov 2017 13:42:07 -0800 Subject: [PATCH 2/2] Move HTML of draft-01 into dir like others While there's not much we can do with the .txt or .xml files in the top level directory right now, we can make the .html use a redirect so we can put it in its draft-NN directory as we do with the more recent drafts. For the .txt and .xml files, while you can get Jekyll to process them, the redirect plugin is implented by emitting an HTML file with a canonical link header, as there is no access to the web server itself to respond with an HTTP redirect code. --- .../draft-zyp-json-schema-01.html | 2 ++ 1 file changed, 2 insertions(+) rename draft-zyp-json-schema-01.html => draft-01/draft-zyp-json-schema-01.html (99%) diff --git a/draft-zyp-json-schema-01.html b/draft-01/draft-zyp-json-schema-01.html similarity index 99% rename from draft-zyp-json-schema-01.html rename to draft-01/draft-zyp-json-schema-01.html index 246fdda2..ea922af5 100644 --- a/draft-zyp-json-schema-01.html +++ b/draft-01/draft-zyp-json-schema-01.html @@ -1,4 +1,6 @@ --- +redirect_from: "/draft-zyp-json-schema-01.html" +permalink: "/draft-01/draft-zyp-json-schema-01.html" --- A JSON Media Type for Describing the Structure and Meaning of JSON Documents