Merge pull request #5 from jbowdre/preview

Further RSS improvements
This commit is contained in:
John Bowdre 2024-01-15 15:02:07 -06:00 committed by GitHub
commit 9e688aa013

View file

@ -43,6 +43,8 @@
<guid>{{ .Permalink }}</guid> <guid>{{ .Permalink }}</guid>
{{- $content := replaceRE "a href=\"(#.*?)\"" (printf "%s%s%s" "a href=\"" .Permalink "$1\"") .Content -}} {{- $content := replaceRE "a href=\"(#.*?)\"" (printf "%s%s%s" "a href=\"" .Permalink "$1\"") .Content -}}
{{- $content = replaceRE "img src=\"(.*?)\"" (printf "%s%s%s" "img src=\"" .Permalink "$1\"") $content -}} {{- $content = replaceRE "img src=\"(.*?)\"" (printf "%s%s%s" "img src=\"" .Permalink "$1\"") $content -}}
{{- $content = replaceRE "<svg.*</svg>" "" $content -}}
{{- $content = replaceRE `-moz-tab-size:\d;-o-tab-size:\d;tab-size:\d;?` "" $content -}}
<description>{{ $content | html }}</description> <description>{{ $content | html }}</description>
</item> </item>
{{ end }} {{ end }}