Preserves: an Expressive Data Language
-
-
-# Preserves: an Expressive Data Language
This [repository]({{page.projectpages}}) contains a
[proposal](preserves.html) and
@@ -13,9 +11,23 @@ This [repository]({{page.projectpages}}) contains a
*Preserves*, a new data model and serialization format in many ways
comparable to JSON, XML, S-expressions, CBOR, ASN.1 BER, and so on.
-**WARNING** Everything in this repository is experimental and in flux!
-The design of Preserves is not finalised and may change drastically.
-Please offer any feedback you may have with this in mind.
+> **WARNING** Everything in this repository is experimental and in
+> flux! The design of Preserves is not finalised and may change
+> drastically. Please offer any feedback you may have with this in
+> mind.
+
+## Core documents
+
+ - [Preserves tutorial](TUTORIAL.html)
+ - [Preserves specification](preserves.html), including semantics,
+ textual syntax, and compact binary syntax
+
+## Additional resources
+
+ - Some [conventions for common data types](conventions.html)
+ - [Open questions](questions.html); see also the
+ [issues list]({{page.projectpages}}/issues)
+ - [Why not Just Use JSON?](why-not-json.html)
## Contact
diff --git a/TODO.md b/TODO.md
index c818f68..c33cab9 100644
--- a/TODO.md
+++ b/TODO.md
@@ -1,6 +1,5 @@
---
---
-
TODO:
diff --git a/TUTORIAL.md b/TUTORIAL.md
index 94828e8..0ddc29e 100644
--- a/TUTORIAL.md
+++ b/TUTORIAL.md
@@ -1,11 +1,10 @@
---
+no_site_title: true
+title: "Preserves: a tutorial"
---
-Preserves: a tutorial
-
-# Preserves: a tutorial
-
-By Christopher Lemmer Webber and Tony Garnock-Jones
+By Christopher Lemmer Webber and Tony Garnock-Jones
+August 2019.
*This document, like Preserves itself, is released under*
*[version 2.0 of the Apache license](./LICENSE).*
diff --git a/_config.yml b/_config.yml
index 57245d9..bb70d60 100644
--- a/_config.yml
+++ b/_config.yml
@@ -5,3 +5,12 @@ highlighter: rouge
baseurl: "/preserves"
url: "/"
+
+defaults:
+ -
+ scope:
+ path: ""
+ values:
+ layout: page
+
+title: "Preserves"
diff --git a/_layouts/page.html b/_layouts/page.html
new file mode 100644
index 0000000..29390fc
--- /dev/null
+++ b/_layouts/page.html
@@ -0,0 +1,8 @@
+---
+layout: skeleton
+extra_html_headers: >
+
+
+---
+
{{ page.title }}
+{{ content }}
diff --git a/_layouts/skeleton.html b/_layouts/skeleton.html
new file mode 100644
index 0000000..b7fd0ad
--- /dev/null
+++ b/_layouts/skeleton.html
@@ -0,0 +1,16 @@
+
+
+
+
+ {% unless page.no_site_title %}{{ site.title }}: {% endunless %}{{ page.title }}
+
+ {{
+ page.extra_html_headers | liquify }}{{
+ layout.extra_html_headers | liquify }}
+
+
+
+ {{ content }}
+
+
+
diff --git a/_plugins/liquify.rb b/_plugins/liquify.rb
new file mode 100644
index 0000000..d392d5f
--- /dev/null
+++ b/_plugins/liquify.rb
@@ -0,0 +1,11 @@
+# http://stackoverflow.com/questions/14487110/include-jekyll-liquid-template-data-in-a-yaml-variable
+
+module Jekyll
+ module LiquifyFilter
+ def liquify(input)
+ Liquid::Template.parse(input).render(@context)
+ end
+ end
+end
+
+Liquid::Template.register_filter(Jekyll::LiquifyFilter)
diff --git a/conventions.md b/conventions.md
index 45e8316..6114eda 100644
--- a/conventions.md
+++ b/conventions.md
@@ -1,9 +1,6 @@
---
+title: "Conventions for Common Data Types"
---
-Preserves: Conventions for Common Data Types
-
-
-# Preserves: Conventions for Common Data Types
The `Value` data type is essentially an S-Expression, able to
represent semi-structured data over `ByteString`, `String`,
diff --git a/normalize.css b/normalize.css
new file mode 100644
index 0000000..192eb9c
--- /dev/null
+++ b/normalize.css
@@ -0,0 +1,349 @@
+/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
+
+/* Document
+ ========================================================================== */
+
+/**
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
+ */
+
+html {
+ line-height: 1.15; /* 1 */
+ -webkit-text-size-adjust: 100%; /* 2 */
+}
+
+/* Sections
+ ========================================================================== */
+
+/**
+ * Remove the margin in all browsers.
+ */
+
+body {
+ margin: 0;
+}
+
+/**
+ * Render the `main` element consistently in IE.
+ */
+
+main {
+ display: block;
+}
+
+/**
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
+ */
+
+h1 {
+ font-size: 2em;
+ margin: 0.67em 0;
+}
+
+/* Grouping content
+ ========================================================================== */
+
+/**
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
+ */
+
+hr {
+ box-sizing: content-box; /* 1 */
+ height: 0; /* 1 */
+ overflow: visible; /* 2 */
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+pre {
+ font-family: monospace, monospace; /* 1 */
+ font-size: 1em; /* 2 */
+}
+
+/* Text-level semantics
+ ========================================================================== */
+
+/**
+ * Remove the gray background on active links in IE 10.
+ */
+
+a {
+ background-color: transparent;
+}
+
+/**
+ * 1. Remove the bottom border in Chrome 57-
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+ */
+
+abbr[title] {
+ border-bottom: none; /* 1 */
+ text-decoration: underline; /* 2 */
+ text-decoration: underline dotted; /* 2 */
+}
+
+/**
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
+
+b,
+strong {
+ font-weight: bolder;
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+code,
+kbd,
+samp {
+ font-family: monospace, monospace; /* 1 */
+ font-size: 1em; /* 2 */
+}
+
+/**
+ * Add the correct font size in all browsers.
+ */
+
+small {
+ font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
+ */
+
+sub,
+sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+
+sub {
+ bottom: -0.25em;
+}
+
+sup {
+ top: -0.5em;
+}
+
+/* Embedded content
+ ========================================================================== */
+
+/**
+ * Remove the border on images inside links in IE 10.
+ */
+
+img {
+ border-style: none;
+}
+
+/* Forms
+ ========================================================================== */
+
+/**
+ * 1. Change the font styles in all browsers.
+ * 2. Remove the margin in Firefox and Safari.
+ */
+
+button,
+input,
+optgroup,
+select,
+textarea {
+ font-family: inherit; /* 1 */
+ font-size: 100%; /* 1 */
+ line-height: 1.15; /* 1 */
+ margin: 0; /* 2 */
+}
+
+/**
+ * Show the overflow in IE.
+ * 1. Show the overflow in Edge.
+ */
+
+button,
+input { /* 1 */
+ overflow: visible;
+}
+
+/**
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
+ */
+
+button,
+select { /* 1 */
+ text-transform: none;
+}
+
+/**
+ * Correct the inability to style clickable types in iOS and Safari.
+ */
+
+button,
+[type="button"],
+[type="reset"],
+[type="submit"] {
+ -webkit-appearance: button;
+}
+
+/**
+ * Remove the inner border and padding in Firefox.
+ */
+
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+ border-style: none;
+ padding: 0;
+}
+
+/**
+ * Restore the focus styles unset by the previous rule.
+ */
+
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+ outline: 1px dotted ButtonText;
+}
+
+/**
+ * Correct the padding in Firefox.
+ */
+
+fieldset {
+ padding: 0.35em 0.75em 0.625em;
+}
+
+/**
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ * `fieldset` elements in all browsers.
+ */
+
+legend {
+ box-sizing: border-box; /* 1 */
+ color: inherit; /* 2 */
+ display: table; /* 1 */
+ max-width: 100%; /* 1 */
+ padding: 0; /* 3 */
+ white-space: normal; /* 1 */
+}
+
+/**
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
+
+progress {
+ vertical-align: baseline;
+}
+
+/**
+ * Remove the default vertical scrollbar in IE 10+.
+ */
+
+textarea {
+ overflow: auto;
+}
+
+/**
+ * 1. Add the correct box sizing in IE 10.
+ * 2. Remove the padding in IE 10.
+ */
+
+[type="checkbox"],
+[type="radio"] {
+ box-sizing: border-box; /* 1 */
+ padding: 0; /* 2 */
+}
+
+/**
+ * Correct the cursor style of increment and decrement buttons in Chrome.
+ */
+
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+ height: auto;
+}
+
+/**
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
+ */
+
+[type="search"] {
+ -webkit-appearance: textfield; /* 1 */
+ outline-offset: -2px; /* 2 */
+}
+
+/**
+ * Remove the inner padding in Chrome and Safari on macOS.
+ */
+
+[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+
+/**
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
+
+::-webkit-file-upload-button {
+ -webkit-appearance: button; /* 1 */
+ font: inherit; /* 2 */
+}
+
+/* Interactive
+ ========================================================================== */
+
+/*
+ * Add the correct display in Edge, IE 10+, and Firefox.
+ */
+
+details {
+ display: block;
+}
+
+/*
+ * Add the correct display in all browsers.
+ */
+
+summary {
+ display: list-item;
+}
+
+/* Misc
+ ========================================================================== */
+
+/**
+ * Add the correct display in IE 10+.
+ */
+
+template {
+ display: none;
+}
+
+/**
+ * Add the correct display in IE 10.
+ */
+
+[hidden] {
+ display: none;
+}
diff --git a/notes.mb.md b/notes.mb.md
index dab650e..b45ee6c 100644
--- a/notes.mb.md
+++ b/notes.mb.md
@@ -1,6 +1,5 @@
---
---
-
Motivations goals and priorities would be good - up front
- so, I say values have an order and can be compared but NOT WHY that's useful
diff --git a/preserves.css b/preserves.css
index 2b96ec3..3989bfe 100644
--- a/preserves.css
+++ b/preserves.css
@@ -1,6 +1,7 @@
body {
font-family: palatino, "Palatino Linotype", "Palatino LT STD", "URW Palladio L", "TeX Gyre Pagella", serif;
box-sizing: border-box;
+ line-height: 1.414;
}
@media screen {
body { padding-top: 2rem; max-width: 40em; margin: auto; font-size: 120%; }
@@ -8,7 +9,7 @@ body {
}
@media print {
@page { size: letter; margin: 4rem 0rem 4.333rem 0rem; }
- body { margin-left: 4.5rem; margin-right: 4.5rem; }
+ body { margin-left: 4.5rem; margin-right: 4.5rem; line-height: 0.98; }
h1, h2 { page-break-before: always; margin-top: 0; }
h1:first-of-type, h2:first-of-type { page-break-before: auto; }
hr+* { page-break-before: always; margin-top: 0; }
@@ -18,7 +19,7 @@ h1, h2, h3, h4, h5, h6 { color: #4f81bd; }
h2 { border-bottom: solid #4f81bd 1px; }
pre, code { background-color: #eee; font-family: "DejaVu Sans Mono", monospace; }
code { font-size: 75%; }
-pre { padding: 0.33rem; }
+pre { padding: 0.33rem; line-height: 1; }
body {
counter-reset: section 0 subsection 0 appendix 0;
diff --git a/preserves.md b/preserves.md
index ec48902..9ab1f2a 100644
--- a/preserves.md
+++ b/preserves.md
@@ -1,9 +1,7 @@
---
+no_site_title: true
+title: "Preserves: an Expressive Data Language"
---
-Preserves: an Expressive Data Language
-
-
-# Preserves: an Expressive Data Language
Tony Garnock-Jones
August 2019. Version 0.0.6.
diff --git a/questions.md b/questions.md
index 5b7dff5..ffacc84 100644
--- a/questions.md
+++ b/questions.md
@@ -1,9 +1,6 @@
---
+title: "Open questions"
---
-Preserves: Open questions
-
-
-# Open questions
Q. Should "symbols" instead be URIs? Relative, usually; relative to
what? Some domain-specific base URI?
diff --git a/representations.md b/representations.md
index a82c4b9..9efc9bb 100644
--- a/representations.md
+++ b/representations.md
@@ -1,9 +1,6 @@
---
+title: "Representing Values in Programming Languages"
---
-Preserves: Representing Values in Programming Languages
-
-
-# Preserves: Representing Values in Programming Languages
**NOT YET READY**
diff --git a/why-not-json.md b/why-not-json.md
index ef0912e..a4e950a 100644
--- a/why-not-json.md
+++ b/why-not-json.md
@@ -1,9 +1,9 @@
---
+title: "Why not Just Use JSON?"
---
-Preserves: Why not Just Use JSON?
-
-# Why not Just Use JSON?
+Tony Garnock-Jones
+September 2018.