diff options
author | tdro <tdro@noreply.example.com> | 2024-02-06 15:43:46 -0500 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2024-02-06 15:43:46 -0500 |
commit | 6d34db5f21dbf5f281a48b2c8bf6a4e5f4e88c30 (patch) | |
tree | ac0eae3dbab91cfb7e5d835c0980ae663141d5cb | |
parent | 219ffd9dd76638810271cc0733ff7732d873eac8 (diff) | |
download | canory-6d34db5f21dbf5f281a48b2c8bf6a4e5f4e88c30.tar.gz canory-6d34db5f21dbf5f281a48b2c8bf6a4e5f4e88c30.tar.bz2 canory-6d34db5f21dbf5f281a48b2c8bf6a4e5f4e88c30.zip |
assets/templates/markdown-feed: Tighten this up
-rw-r--r-- | assets/templates/markdown-feed.yaml | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/assets/templates/markdown-feed.yaml b/assets/templates/markdown-feed.yaml index fbe763b..ff0aae5 100644 --- a/assets/templates/markdown-feed.yaml +++ b/assets/templates/markdown-feed.yaml @@ -21,12 +21,19 @@ feed: {{ end -}} --- -{{ $content := .content | replaceRE "{" "{" | replaceRE "}" "}" -}} +{{ $content := .content }} + +{{- $content = replace $content "{" "{" -}} +{{- $content = replace $content "}" "}" -}} +{{- $content = replace $content "[" "[" -}} +{{- $content = replace $content "]" "]" -}} + {{ $content }} -{{- $enclosureDescription := "Image/Picture" -}} +{{- $caption := "Image/Picture" -}} + {{- with $content -}} - {{ $enclosureDescription = $content | truncate 80 "" }} + {{ $caption = $content | truncate 80 "" }} {{- end }} {{ with .enclosure -}} @@ -43,8 +50,8 @@ feed: (in . ".svg") (in . ".webp") -}} -![{{ $enclosureDescription }}]({{ . }} " - {{ $enclosureDescription }}" +![{{ $caption }}]({{ . }} " + {{ $caption }}" ) {{- end -}} {{- end }} |