diff options
author | tdro <tdro@noreply.example.com> | 2022-12-22 02:19:54 -0500 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-12-22 02:19:54 -0500 |
commit | f02259a87f5be78ac3611a2341bed83306e94223 (patch) | |
tree | d2f80015f7e548a7cd34813f633b2429e64b10df /themes/default/layouts/partials | |
parent | b7acf1be64b6845a0b826a1af4c0db62e70e9aba (diff) | |
download | canory-f02259a87f5be78ac3611a2341bed83306e94223.tar.gz canory-f02259a87f5be78ac3611a2341bed83306e94223.tar.bz2 canory-f02259a87f5be78ac3611a2341bed83306e94223.zip |
themes/default/layouts/shortcodes/video: Add RSS version
Unify other helpers
Diffstat (limited to 'themes/default/layouts/partials')
-rw-r--r-- | themes/default/layouts/partials/function-content.html | 3 | ||||
-rw-r--r-- | themes/default/layouts/partials/video-container.html | 7 |
2 files changed, 5 insertions, 5 deletions
diff --git a/themes/default/layouts/partials/function-content.html b/themes/default/layouts/partials/function-content.html index 9ad5a1a..59776aa 100644 --- a/themes/default/layouts/partials/function-content.html +++ b/themes/default/layouts/partials/function-content.html @@ -1,7 +1,6 @@ {{- $context := . -}} {{- $content := $context.Content -}} {{- $expired := and .ExpiryDate (ge now.Unix .ExpiryDate.Unix) -}} -{{- $empty := eq (len $content) 0 -}} {{- $content = $content | @@ -20,7 +19,7 @@ {{- $content = replace $content $brokenBlockquote $fixedBlockquote -}} {{- end -}} -{{- if $empty -}} +{{- if not $content -}} {{- $content = "This message contains no content." -}} {{- end -}} diff --git a/themes/default/layouts/partials/video-container.html b/themes/default/layouts/partials/video-container.html index caf89d3..bae0cbb 100644 --- a/themes/default/layouts/partials/video-container.html +++ b/themes/default/layouts/partials/video-container.html @@ -36,9 +36,10 @@ {{- $caption = "No remote video data found for source" -}} {{- end -}} {{- else -}} - {{- $cache = resources.Get (path.Join "public/" $fileCache) -}} - {{- $cache = $cache.Content | resources.FromString $fileCache -}} - {{- $cache = $cache.Permalink -}} + {{- with $cache = resources.Get (path.Join "public/" $fileCache) -}} + {{- $cache = $cache.Content | resources.FromString $fileCache -}} + {{- $cache = $cache.Permalink -}} + {{- end -}} {{- end -}} {{- $source = $cache -}} |