From 75844012795028f7df608126e4e07b5ad6108d65 Mon Sep 17 00:00:00 2001 From: Shawn O'Hare Date: Tue, 29 Dec 2015 20:41:07 -0800 Subject: [PATCH] Implement side + margin note shortcodes. --- README.md | 9 +++++++++ layouts/shortcodes/marginnote.html | 3 +++ layouts/shortcodes/sidenote.html | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 layouts/shortcodes/marginnote.html create mode 100644 layouts/shortcodes/sidenote.html diff --git a/README.md b/README.md index 3649fbe..fa0674e 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,15 @@ The site specific parameters that this theme :wrecognizes are: (i.e., pages of type "post") ignore this parameter. - `toc` boolean: if true, display the table of contents for the page. +## Shortcodes + +- `sidenote`: Wrap text to produce an automatically numbered sidenote. + The single positional argument is a required unique identifier. + Example: `{{% sidenote "sn-example" %}}Some sidenote{{% /sidenote %}}` +- `marginnote`: Wrap text to produce a numberless margin note. + The single positional argument is a required unique identifier. + Example: `{{% marginnote"mn-example" %}}Some marginnote{{% /marginnote%}}` + ## Templates TODO - [ ] Describe the role of each template file, as commenting within the files diff --git a/layouts/shortcodes/marginnote.html b/layouts/shortcodes/marginnote.html new file mode 100644 index 0000000..2f0557d --- /dev/null +++ b/layouts/shortcodes/marginnote.html @@ -0,0 +1,3 @@ + + +{{ .Inner }} diff --git a/layouts/shortcodes/sidenote.html b/layouts/shortcodes/sidenote.html new file mode 100644 index 0000000..b62304e --- /dev/null +++ b/layouts/shortcodes/sidenote.html @@ -0,0 +1,3 @@ + + +{{ .Inner }}