From 0649b9dc354281595705d9a0a9511c2f42039803 Mon Sep 17 00:00:00 2001 From: Oskar Thoren Date: Mon, 29 Mar 2021 10:16:37 +0800 Subject: [PATCH] Tweak single layout --- README.md | 2 ++ content/docs/rfcs/1/README.md | 4 ++-- layouts/docs/single.html | 43 +++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 layouts/docs/single.html diff --git a/README.md b/README.md index 53586008..52eb19bc 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,5 @@ Specs for Vac. WIP replacement for specs.vac.dev Ensure you have the Hugo extended edition (https://gohugo.io/getting-started/installing/), then run `hugo server`. + +Heavily inspired by https://rfc.zeromq.org/. diff --git a/content/docs/rfcs/1/README.md b/content/docs/rfcs/1/README.md index eb957b3f..03b2fa4a 100644 --- a/content/docs/rfcs/1/README.md +++ b/content/docs/rfcs/1/README.md @@ -1,6 +1,6 @@ --- -domain: rfc.vac.dev -shortname: 1/COSS +slug: 1 +title: 1/COSS name: Consensus-Oriented Specification System status: draft editor: Oskar Thoren diff --git a/layouts/docs/single.html b/layouts/docs/single.html new file mode 100644 index 00000000..43334f00 --- /dev/null +++ b/layouts/docs/single.html @@ -0,0 +1,43 @@ +{{ define "main" }} +
+ {{ printf "# %s" .Params.title | markdownify }} + {{ if .Params.name }} + {{ printf "# %s" .Params.name | markdownify }} + {{ end }} + + {{ if eq .Params.status "raw" }} + + {{ end }} + {{ if eq .Params.status "draft" }} + + {{ end }} + {{ if eq .Params.status "stable" }} + + {{ end }} + {{ if eq .Params.status "deprecated" }} + + {{ end }} + {{ if eq .Params.status "retired" }} + + {{ end }} + +
    +
  • Status: {{ .Params.status | markdownify }}
  • +
  • Editor: {{ .Params.editor | markdownify }}
  • + {{ if .Params.contributors }} +
  • Contributors: + {{ range $index, $element := .Params.contributors }} + {{if $index}},{{end}} + {{ . | markdownify }} + {{ end }} +
  • + {{ end }} +
+ + {{- .Content -}} +
+{{ end }} + +{{ define "toc" }} + {{ partial "docs/toc" . }} +{{ end }}