{{- $hugoGenerator := index (findRE `content=\"(.+)\"` hugo.Generator) 0 }} {{ if .Site.Params.favicons.use }} {{- $metas := .Site.Params.favicons.metas }} {{- range (split $metas "\n") }} {{- $original := index (findRE `href=\"(.*?)\"` .) 0 }} {{- $processed := replaceRE `href=|\"` `` $original | relURL }} {{- replaceRE `(href=\")(.*?)(\")` (print `$1` $processed `$3`) . | safeHTML }} {{- end }} {{- end -}}