// Copyright © 2013 Steve Francia . // // Licensed under the Simple Public License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://opensource.org/licenses/Simple-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package bundle type Tmpl struct { Name string Data string } func (t *GoHtmlTemplate) EmbedShortcodes() { const k = "shortcodes" t.AddInternalTemplate(k, "highlight.html", `{{ $lang := index .Params 0 }}{{ highlight .Inner $lang }}`) t.AddInternalTemplate(k, "test.html", `This is a simple Test`) t.AddInternalTemplate(k, "figure.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 }}
`) }