diff --git a/exampleSite/content/home/usage-shortcodes.md b/exampleSite/content/home/usage-shortcodes.md index 477fa88..d186fc9 100644 --- a/exampleSite/content/home/usage-shortcodes.md +++ b/exampleSite/content/home/usage-shortcodes.md @@ -22,6 +22,29 @@ The `fragment` shortcode makes content appear incrementally. --- +### Frag shortcode + +The `frag` shortcode is like `fragment` but more terse. It accepts the content as the `c` attribute. + +``` +{{}} +{{}} +{{}} +``` + +{{< frag c="One" >}} +{{< frag c="Two" >}} +{{< frag c="Three" >}} + +--- + +Both `fragment` and `frag` accept two additional parameters: + +- `class`: sets the class of the wrapping `span` element +- `index`: controls the order in which sections will appear + +--- + {{% section %}} ### Section shortcode diff --git a/layouts/shortcodes/frag.html b/layouts/shortcodes/frag.html new file mode 100644 index 0000000..c1de8c8 --- /dev/null +++ b/layouts/shortcodes/frag.html @@ -0,0 +1,4 @@ + + {{ .Get "c" }} + \ No newline at end of file diff --git a/layouts/shortcodes/fragment.html b/layouts/shortcodes/fragment.html index 82271c2..dc41e03 100644 --- a/layouts/shortcodes/fragment.html +++ b/layouts/shortcodes/fragment.html @@ -1,8 +1,4 @@ - + {{ .Inner }} \ No newline at end of file