Page MenuHomePhabricator

[e.cash] add rss feed for blog
ClosedPublic

Authored by johnkuney on Jan 29 2024, 17:57.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Commits
rABC27d3cb2b7313: [e.cash] add rss feed for blog
Summary

Adding a rss generator package and function to make rss feed for blog as requested
fyi the reason the generateRssFeed function is where it is, is because next was throwing errors when trying to use fs outside of a getStaticProps file

Test Plan

preview the site and check out /rss.xml. Should see rss data
Can also use a rss reader like this one to test https://chromewebstore.google.com/detail/rss-feed-reader/pnjaodmkngahhkoihejjehlcdlnohgmp
Plug in localhost if youre running locally, or the bot url and see if the feed populates correctly

Diff Detail

Repository
rABC Bitcoin ABC
Branch
ecash-rss-feed
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 26759
Build 53086: Build Diff
Build 53085: arc lint + arc unit

Event Timeline

bytesofman added inline comments.
web/e.cash/pages/blog.js
122 ↗(On Diff #44695)

can we not get an image for each post?

This revision now requires changes to proceed.Jan 29 2024, 23:24

add image to enclosure object

The build failed due to an unexpected infrastructure outage. The administrators have been notified to investigate. Sorry for the inconvenience.
The build failed due to an unexpected infrastructure outage. The administrators have been notified to investigate. Sorry for the inconvenience.

yeah looks like theres not a straight forward image value for the feed item, but you can add it to enclosure like this...unsure how its supposed to render in a reader, or what the norm is. But testing now with the bot build

Okay nice, looks to be working with this reader https://rssviewer.app/. Free version of feeder doesnt seem to load images

Fabien added inline comments.
web/e.cash/pages/blog.js
128

can we avoid the hardcoded url ? So we can move the backend easily

web/e.cash/pages/blog.js
128

Would be better, I actually have a task to do this as its currently hardcoded in some other places as well. Should I add to this diff or do it in another?

bytesofman added inline comments.
web/e.cash/pages/blog.js
128

as you are introducing this instance here in this diff -- simply do not introduce it in this diff.

use a var instead of hardcoding it.

in a later diff, it could make sense to use that same var to replace any other instances.

This revision now requires changes to proceed.Jan 30 2024, 22:53

add .env variables for urls

the whole enclosure thing instead of just a normal image tag is weird.

who wants this rss feed and what do they want it for?

Aimal requested: 'Recently, Binance requested one, for now, we told them to sync content from our Twitter account but would be great to have one. They need it to easily sync our blog content on our new Binance Square account.'

Aimal requested: 'Recently, Binance requested one, for now, we told them to sync content from our Twitter account but would be great to have one. They need it to easily sync our blog content on our new Binance Square account.'

ok. we might have to come back later and match their format. but, this is better than what we have now.

This revision is now accepted and ready to land.Jan 31 2024, 18:14
This revision was automatically updated to reflect the committed changes.