--- title: "Hugo Short Codes" date: 2022-06-14T19:36:18+02:00 draft: true toc: false tags: - hugo - code --- ## Inserting columns ``` go
{{ with .Get
{{ .Inner | markdownify }}
``` ## Inserting SVG Figures ``` go {{- if .Get "link" -}} {{- end -}} {{- if false }} {{ end -}} {{ with .Get {{- if .Get "link" }}{{ end -}} {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
{{ with (.Get "title") -}}

{{ . }}

{{- end -}} {{- if or (.Get "caption") (.Get "attr") -}}

{{- .Get "caption" | markdownify -}} {{- with .Get "attrlink" }} {{- end -}} {{- .Get "attr" | markdownify -}} {{- if .Get "attrlink" }}{{ end }}

{{- end }}
{{- end }} ``` ``` go {{}} railroad.Diagram("foo", railroad.Choice(0, "bar", "baz"), css=style) {{}} ``` {{< python-svg dest="/images/posts/test.svg" title="This is a python-svg exmaple." >}} railroad.Diagram("foo", railroad.Choice(0, "bar", "baz"), css=style) {{< /python-svg >}}