Browse Source

Scripted auto-commit on change (2020-06-11 19:57:50) by gitwatch.sh

master
jk 5 years ago
parent
commit
19aee7364e
  1. 12
      content/photo/5ee255ec/index.md
  2. 14
      content/photo/5ee2782a/index.md
  3. 7
      layouts/_default/rss.xml

12
content/photo/5ee255ec/index.md

@ -1,12 +0,0 @@
---
date: '2020-06-11 17:03:56'
draft: false
photo:
- 'https://jk.nipponalba.scot/media/file-20200611170355-1098.jpg'
posttype: photo
slug: 5ee255ec
thumbnail:
- 'https://jk.nipponalba.scot/media/file-20200611170355-1098.jpg'
visibility: public
---
Quick photo test

14
content/photo/5ee2782a/index.md

@ -1,14 +0,0 @@
---
date: '2020-06-11 19:30:02'
draft: false
photo:
- 'https://jk.nipponalba.scot/media/file-20200611193001-1849.jpg'
posttype: photo
slug: 5ee2782a
thumbnail:
- 'https://jk.nipponalba.scot/media/file-20200611193001-1849.jpg'
visibility: public
---
Hopefully this post is devoid of html tags and displays an image..
2nd line of text to see if any formatting at all is maintained!

7
layouts/_default/rss.xml

@ -20,14 +20,15 @@
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{ .Content | plainify }}
({{ .Permalink }})</description>
({{ .Permalink }})
{{ range .Params.Photo }}
{{ if not ( in . "http" ) }}
{{ $image_location := printf "static/%s" .}}{{$image := readFile $image_location }}{{$len := len $image}}<enclosure url="https://jk.nipponalba.scot{{.}}" length="{{$len}}" type="image/jpeg" />
<media:content xmlns:media="http://search.yahoo.com/mrss" url="https://jk.nipponalba.scot{{.}}" medium="image" type="image/jpeg"/>
{{ else }}
{{ $image_location := replace (printf "%s" .) "https://jk.nipponalba.scot/" "static/"}}{{$image := readFile $image_location }}{{$len := len $image}}<enclosure url="{{.}}" length="{{$len}}" type="image/jpeg" />
<media:content xmlns:media="http://search.yahoo.com/mrss" url="{{.}}" medium="image" type="image/jpeg"/>
{{ end }}
{{ end }}
</description>
</item>
{{ end }}
</channel>