From f09505a657c36d722c19f925731a1d37bed9eaf6 Mon Sep 17 00:00:00 2001 From: spf13 Date: Tue, 10 Dec 2013 19:36:44 -0500 Subject: [PATCH] Adding example short codes to the documentation --- docs/content/extras/shortcodes.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/content/extras/shortcodes.md b/docs/content/extras/shortcodes.md index 6bf10abb2..6ddab4088 100644 --- a/docs/content/extras/shortcodes.md +++ b/docs/content/extras/shortcodes.md @@ -33,6 +33,13 @@ The format for named parameters models that of html with the format name="value" {{ % youtube 09jf3ow9jfw %}} +Would load the template /layouts/shortcodes/youtube.html + +
+ +
+ This would be rendered as
@@ -48,6 +55,27 @@ This would be rendered as {{ % img src="/media/spf13.jpg" title="Steve Francia" %}} +Would load the template /layouts/shortcodes/img.html + + +
+ {{ if isset .Params "link"}}{{ end }} + + {{ if isset .Params "link"}}{{ end }} + {{ if or (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}} +
{{ if isset .Params "title" }} +

{{ index .Params "title" }}

{{ end }} + {{ if or (isset .Params "caption") (isset .Params "attr")}}

+ {{ index .Params "caption" }} + {{ if isset .Params "attrlink"}} {{ end }} + {{ index .Params "attr" }} + {{ if isset .Params "attrlink"}} {{ end }} +

{{ end }} +
+ {{ end }} +
+ + Would be rendered as: