diff --git a/README.md b/README.md index fa0674e..f2b77c1 100644 --- a/README.md +++ b/README.md @@ -31,12 +31,28 @@ The site specific parameters that this theme :wrecognizes are: ## 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%}}` +This theme provides the following shortcodes. + +- `marginnote` + - Description: Wrap text to produce a numberless margin note. + - Usage: Accepts a required positional argument that is the margin note id. + `{{% marginnote """ %}}...{{% /marginnote %}}` + - Example: `{{% marginnote "mn-example" %}}Some marginnote{{% /marginnote%}}` + +- `section` + - Description: This shortcode is provided as a work-around for wrapping + complex blocks of markdown in section tags. + - Usage: `{{< section "" >}}` map respectively to + `
` and `
` tags. + - Example: `{{< section "begin" >}}` inserts a `
` tag, while + `{{
}}` inserts the closing `
` tag. + +- `sidenote` + - Description: Wrap text to produce an automatically numbered sidenote. + - Usage: identical to `marginnote`. + Accepts a required positional argument that is the side note id. + `{{% sidenote """ %}}...{{% /sidenote %}}` + - Example: `{{% sidenote "sn-example" %}}Some sidenote{{% /sidenote %}}` ## Templates TODO diff --git a/layouts/shortcodes/section.html b/layouts/shortcodes/section.html new file mode 100644 index 0000000..72fbdbb --- /dev/null +++ b/layouts/shortcodes/section.html @@ -0,0 +1,9 @@ +{{ with .Get 0 }} + {{ if eq . "begin" }} +
+ {{ else if eq . "end" }} +
+ {{ end }} +{{ end }} + +