add categories and featimg as enclusure in rss

This commit is contained in:
lesion 2022-01-17 12:04:42 +01:00
parent 2c752912c5
commit 7440dbdba1
No known key found for this signature in database
GPG key ID: 352918250B012177

View file

@ -7,8 +7,12 @@ rss(version='2.0' xmlns:atom="http://www.w3.org/2005/Atom")
description #{settings.description} description #{settings.description}
each event in events each event in events
item item
if (event.media && event.media.length)
<enclosure url="#{settings.baseurl}/media/#{event.media[0].url}" type='image/jpeg'></enclosure>
title [#{moment.unix(event.start_datetime).format("YY-MM-DD")}] #{event.title} @#{event.place.name} title [#{moment.unix(event.start_datetime).format("YY-MM-DD")}] #{event.title} @#{event.place.name}
link #{settings.baseurl}/event/#{event.slug || event.id} link #{settings.baseurl}/event/#{event.slug || event.id}
each tag in event.tags
category #{tag.tag}
description description
| <![CDATA[ | <![CDATA[
| <h4>#{event.title}</h4> | <h4>#{event.title}</h4>
@ -19,5 +23,5 @@ rss(version='2.0' xmlns:atom="http://www.w3.org/2005/Atom")
| <pre>!{event.description}</pre> | <pre>!{event.description}</pre>
| ]]> | ]]>
pubDate= new Date(event.updatedAt).toUTCString() pubDate= new Date(event.updatedAt).toUTCString()
guid(isPermaLink='false') #{settings.baseurl}/event/#{event.slug || event.id} guid #{settings.baseurl}/event/#{event.slug || event.id}