diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html new file mode 100644 index 0000000..f3d2043 --- /dev/null +++ b/layouts/_default/_markup/render-image.html @@ -0,0 +1,10 @@ +{{- $img := .Page.Resources.GetMatch .Destination -}} +{{- if and (not $img) .Page.File -}} +{{- $path := path.Join .Page.File.Dir .Destination -}} +{{- $img = resources.Get $path -}} +{{- end -}} +{{- with $img -}} +{{ $.Text }} +{{- else -}} +{{ $.Text }} +{{- end -}} \ No newline at end of file