-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #534 from photonia-io/rss
RSS feeds for photos & albums
- Loading branch information
Showing
11 changed files
with
100 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
backend: bex rails s | ||
frontend: bin/vite dev | ||
sidekiq: bex sidekiq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
xml.instruct! :xml, version: "1.0" | ||
xml.rss version: "2.0" do | ||
xml.channel do | ||
xml.title "Photonia - Albums" | ||
xml.description "Albums by Janos Rusiczki" | ||
xml.link albums_url | ||
|
||
@albums.each do |album| | ||
xml.item do | ||
xml.title album.title | ||
xml.description album.description | ||
xml.pubDate album.created_at.to_s(:rfc822) | ||
xml.link album_url(album) | ||
xml.guid album_url(album) | ||
if cover_image = album&.photos&.first&.image(:medium_intelligent).presence || album&.photos&.first&.image(:medium_square) | ||
xml.enclosure url: cover_image.url, type: cover_image.mime_type, length: cover_image.size | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
xml.instruct! :xml, version: "1.0" | ||
xml.rss version: "2.0", "xmlns:media": "http://search.yahoo.com/mrss/" do | ||
xml.channel do | ||
xml.title "Photonia - Photos" | ||
xml.description "Photos by Janos Rusiczki" | ||
xml.link photos_url | ||
|
||
@photos.each do |photo| | ||
next unless medium_image = photo.image(:medium) | ||
thumbnail_image = photo.image(:thumbnail_intelligent).presence || photo.image(:thumbnail_square) | ||
xml.item do | ||
xml.title photo.name | ||
xml.description photo.description | ||
xml.pubDate photo.created_at.to_s(:rfc822) | ||
xml.link photo_url(photo) | ||
xml.guid photo_url(photo) | ||
xml.media :content, url: medium_image.url, type: medium_image.mime_type, width: medium_image.width, height: medium_image.height | ||
xml.media title: photo.name | ||
xml.media description: photo.description | ||
xml.media :thumbnail, url: thumbnail_image.url, width: thumbnail_image.width, height: thumbnail_image.height | ||
xml.media :credit, role: "photographer", content: "Janos Rusiczki" | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters