{{ .Page.Scratch.Add "hasImages" "true" }} {{/* Scratch do conditionally include css/js files. */}} {{- $img := .Get "src" }} {{- $isRemote := strings.HasPrefix $img "http" -}} {{- if not $isRemote -}} {{- $img := .Page.Resources.GetMatch $img -}} {{- if and (not $img) .Page.File -}} {{- $path := path.Join .Page.File.Dir $img -}} {{- $img = resources.Get $path | .Permalink -}} {{- end -}} {{- end -}} {{(.Get "text") | markdownify }}{{ partial "inline-svg" .Site.Params.content.imageLinkIcon }}