From f2f65487c178ffb7afd70565c19d4fedb57e9064 Mon Sep 17 00:00:00 2001 From: jk Date: Thu, 11 Jun 2020 15:39:47 +0100 Subject: [PATCH] trying to make some RSS amendments --- content/photo/5eb43064/index.md | 11 ----------- layouts/_default/rss.xml | 7 +++++++ 2 files changed, 7 insertions(+), 11 deletions(-) delete mode 100644 content/photo/5eb43064/index.md diff --git a/content/photo/5eb43064/index.md b/content/photo/5eb43064/index.md deleted file mode 100644 index ce4fb99c..00000000 --- a/content/photo/5eb43064/index.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -date: '2020-05-07 16:59:32' -draft: false -photo: - - 'https://micropub.rocks/media/sunset.jpg' -posttype: photo -slug: 5eb43064 -thumbnail: - - 'https://micropub.rocks/media/sunset.jpg' ---- -Micropub test of creating a photo referenced by URL diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index 71501b45..e0012d0e 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -22,6 +22,13 @@ {{ .Content | html }} {{ range .Page.Params.Photo }}{{ printf "" . | html }}{{end}} ({{ .Permalink }}) + {{ range .Params.Photo }} + {{ if not ( in . "http" ) }} + {{ $image_location := printf "static/%s" .}}{{$image := readFile $image_location }}{{$len := len $image}} + {{ else }} + {{ $image_location := replace (printf "%s" .) "https://jk.nipponalba.scot/" "static/"}}{{$image := readFile $image_location }}{{$len := len $image}} + {{ end }} + {{ end }} {{ end }}