From ab24565e76adbcda02d47b6ceb46b20b1ecd3067 Mon Sep 17 00:00:00 2001 From: dozens Date: Mon, 15 Apr 2024 11:03:58 -0600 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 25 +++++++++++++++++++++++++ frontmatter.rec | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 README.md create mode 100644 frontmatter.rec diff --git a/README.md b/README.md new file mode 100644 index 0000000..32e0c2d --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +# frontmatter.rec + +minimal acceptable document metadata +schema and scaffolding + +## usage + +```sh +❯ printf "%s\n" "---" $(recsel frontmatter.rec | recfmt '{{title}}: +') "---" > document.md + +❯ cat document.md + +--- +title: +description: +author: +version: +created: +published: +updated: +flags: +tags: +--- +``` diff --git a/frontmatter.rec b/frontmatter.rec new file mode 100644 index 0000000..8057de7 --- /dev/null +++ b/frontmatter.rec @@ -0,0 +1,44 @@ +%rec: frontmatter +%doc: minimal acceptable document metadata +%mandatory: title type description +%allowed: title type description +%type: title,description line +%type: type enum string datetime list +%key: title + +title: title +type: string +description: the title of the document + +title: description +type: string +description: a summary, description, or tagline of the document + +title: author +type: string +description: the author of the document + +title: version +type: string +description: document version + +title: created +type: datetime +description: when did work begin on the document + +title: published +type: datetime +description: when was the document originally published + +title: updated +type: datetime +description: when was the document last updated + +title: flags +type: list +description: document status e.g. hidden, draft, unlisted + +title: tags +type: list +description: keywoards, categories, and tags +