1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-27 14:16:20 -04:00
jarv.is/layouts/shortcodes/image.rss.xml
Jake Jarvis 363b4edf1c
shift asset processing to webpack (#424)
also migrated SASS to latest syntax (via dart-sass) and vastly simplified light/dark theme logic
2021-06-19 17:19:01 -04:00

11 lines
523 B
XML

{{- $optimized := partial "functions/optimize-image" . -}}
<p align="center">
{{ with .Get "link" }}<a href="{{ . }}">{{ end }}
<img src="{{ print .Site.Params.baseUrl $optimized.Permalink }}" width="{{ $optimized.Width }}" height="{{ $optimized.Height }}"
{{- with .Get "alt" }} alt="{{ . | safeHTML }}"{{ end }}
{{- with .Inner }} alt="{{ . | $.Page.RenderString | plainify | safeHTML }}"{{ end }}>
{{ if .Get "link" }}</a>{{ end }}
{{ with .Inner }}<br>{{ . | $.Page.RenderString | safeHTML }}{{ end -}}
</p>