mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-08-06 07:51:36 -05:00
Workaround for multline strings bounded with backtick not supporting any way to escape one to type it inside the string.
18 lines
501 B
HTML
18 lines
501 B
HTML
<figure>
|
|
{{ $resource_title := "" }}
|
|
{{ with .Get "src" }}
|
|
{{ with $.Page.Resources.Get . }}
|
|
{{ $resource_title = .Title }}
|
|
{{ partial "embed-resource.html" . }}
|
|
{{ else }}
|
|
{{ errorf "resource %q not found" . }}
|
|
{{ end }}
|
|
{{ else }}
|
|
{{ .Inner }}
|
|
{{ end }}
|
|
|
|
{{ with or (.Get "caption") (.Get 0) $resource_title }}
|
|
<figcaption>{{ (replace . "\\bt" "`") | markdownify }}</figcaption>
|
|
{{ end }}
|
|
</figure>
|