{{- /* Usage: {{< screenshot src="app/name.png" alt="…" caption="…" >}}. Images live in assets/screenshots/. Add demo="true" for screenshots taken on an upstream public demo rather than a Federated Core server. */ -}} {{- $src := .Get "src" -}} {{- with resources.Get (printf "screenshots/%s" $src) -}} {{- $img := . -}} {{- if gt .Width 1280 }}{{ $img = .Resize "1280x webp q82" }}{{ else }}{{ $img = .Process "webp q82" }}{{ end -}}
{{ $.Get
{{- with $.Get "caption" }}{{ . | $.Page.RenderString }}{{ end -}} {{- if eq ($.Get "demo") "true" }} Shown on the public demo. Your server may look slightly different.{{ end -}}
{{- else -}} {{- errorf "screenshot: assets/screenshots/%s not found (%s)" $src $.Position -}} {{- end -}}