aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/shortcodes/self.html
blob: 3b620b77638af7d34030a1d4713291a1a545be5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
{{- $url     := default "https://example.org/"              (.Get "url"     | default (.Get 0)) -}}
{{- $title   := default "Self Embed"                        (.Get "title"   | default (.Get 1)) -}}
{{- $caption := default (print $title ": [Link](" $url ")") (.Get "caption" | default (.Get 2)) -}}
{{- $sandbox := default ""                                  (.Get "sandbox" | default (.Get 3)) -}}

<self-embed>
  <iframe
    sandbox="{{ $sandbox }}"
    src="{{ $url }}"
    title="{{ $title }}"
  ></iframe>
  <figcaption>{{ $caption | markdownify }}</figcaption>
</self-embed>