diff options
author | clarkzjw <[email protected]> | 2023-03-01 19:14:59 -0800 |
---|---|---|
committer | clarkzjw <[email protected]> | 2023-03-01 20:21:47 -0800 |
commit | 375c0d2544b20124a8cf497819006e01cd217225 (patch) | |
tree | 8984bf464561722f33dd15f60a7872ff1aa71912 /site/feeds | |
parent | f87fef5388ca419f79c4750810e302cedfc310f5 (diff) | |
download | photo-375c0d2544b20124a8cf497819006e01cd217225.tar.gz |
host photos.json on cloudflare r2
Diffstat (limited to 'site/feeds')
-rw-r--r-- | site/feeds/photos.xml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/site/feeds/photos.xml b/site/feeds/photos.xml new file mode 100644 index 0000000..41ecc5d --- /dev/null +++ b/site/feeds/photos.xml | |||
@@ -0,0 +1,31 @@ | |||
1 | --- | ||
2 | permalink: /rss.xml | ||
3 | --- | ||
4 | <?xml version="1.0" encoding="UTF-8"?> | ||
5 | {% capture srcbase %}src="{{site.url}}/{% endcapture %} | ||
6 | <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> | ||
7 | <channel> | ||
8 | <title>@clarkzjw's photos</title> | ||
9 | <description>Photos</description> | ||
10 | {% assign photos = site.data.photos | slice: 0, 10 %} | ||
11 | <lastBuildDate>{{ photos.first.createdAt | date_to_rfc822 }}</lastBuildDate> | ||
12 | <atom:link href="{{ site.url }}/rss.xml" rel="self" type="application/rss+xml" /> | ||
13 | <link>{{ site.url }}/rss.xml</link> | ||
14 | {% for photo in photos limit:10 %} | ||
15 | <item> | ||
16 | <title>{{ photo.caption | markdownify | strip_html | xml_escape }}</title> | ||
17 | <description> | ||
18 | {% capture content %} | ||
19 | <a href="{{ photo.path }}"> | ||
20 | <img src="{{ photo.path }}" width="100%" alt="{{ photo.alt }}"/> | ||
21 | </a> | ||
22 | {% endcapture %} | ||
23 | {{ content | xml_escape }}{{ openheart | xml_escape }} | ||
24 | </description> | ||
25 | <pubDate>{{ photo.createdAt | date_to_rfc822 }}</pubDate> | ||
26 | <link>{{ site.url }}/#P{{ photo.guid }}</link> | ||
27 | <guid isPermaLink="true">{{ site.url }}/#P{{ photo.guid }}</guid> | ||
28 | </item> | ||
29 | {% endfor %} | ||
30 | </channel> | ||
31 | </rss> | ||