Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@plusgut Any tips/ideas on that one? I've got some in my mind but I've never worked with those things :)
-
@xenira not yet for a reason, I really have to refactor first, it's quite a mess right now but it works 😅
-
@linuxxx rss or atom feeds are pretty basic, just look at any rss feed, for example: https://news.ycombinator.com/rss I think theres also a ton of libraries that take in an array and output it all perfectly ready for you
-
plusgut60137y@linuxxx how many items is a really good question. Since the rss standard didn't specify pagination originally (don't now if it's officially in there now). And because of that most rss readers don't implement such a thing.
For the beginning I would recommend to put all items in the rss feed, and maybe later add pagination to it. See if there are to many performance implications happening. -
@plusgut wouldn't that rather turn into a content api then? since I never actually saw any pagination in rss feeds so far, since most (all?) readers just scrape those subbed rss feeds in some intervals to get newer items - and then have their own pagination, that fetches the items from their own database.
-
@linuxxx what I saw some pages doing, that do have external content, is to seperate that and have 2 rss feeds, one is your blogs only and the other one your blogs+external content, might be a cool idea to consider, since maybe some wouldn't want external content mostly dominating your blog posts or something
-
Hmm good one yeah, I just created one table in the current db (people, you've really got to try harder than trying to do SQL injection attacks on the blog, IT DOESN'T EVEN USE SQL itself) but this is a good one, thanks!
-
plusgut60137y@JoshBent that rss readers are mostly just scraping the feed is totally true for most readers. But not all of them.
What a reader should do (as RFC 5005 describes https://tools.ietf.org/html/...)
is: get the feed, and when you initially scrape it, get all the *next* pages as well. And when you come the next time, after the initial scraping, you scrape until the first item you already indexed. If it's not on the first page, you would need to continue to the *next* pages, until you hit the first item you already know.
But as I said before, sadly that's not whats happening for most rss-readers. -
plusgut60137y@linuxxx at your first implementation I would completely ignore the pagination. Work iteratively and show all items you have at the rss.xml without any pagination.
And if you notice performance issues, you can work on that later. -
@linuxxx either you generate the .xml file whenever you publish new content or just rewrite that in nginx basically
-
@plusgut nice, thanks for that, didn't know rss readers should actually fetch the entire range
-
@linuxxx though having it just be generated or cached atleast, can be a lot easier on your resources, since the php script would always re-generate that specific document, with each request, which also could be a problem if you dont limit it, if you have it reading from mysql - if you have it reading from redis not so much. (though still re-generating per request is not needed)
-
@linuxxx that could be a problem, since people could abuse that to bring down your mysql database iirc.
-
@JoshBent I've got an idea on that one, let me elaborate soon :)
@dfox @trogus do you have any method to resize this? And if yes, what numbers would I have to change to adjust the width/height? (https://avatars.devrant.com/v-18_c-...) -
dfox426037y@linuxxx what size are you looking for specifically? (Bigger/smaller). You can see different crops by changing the “c” parameter in the avatar url.
-
-
@JonnyDoe It's an online/cyber security and online privacy blog so anything that fits in those categories.
Can be software reviews, recent event reviewings and so on :) -
@JoshBent Right now I'm thinking of generating the feed xml's every time again (with the 10 last items) when inserting a new item. The generating probably takes less than a second and everything will be served staticly :)
-
@Jifuna The blog and soon the privacy site will both run on one of their vps's :) (the blog already does)
Alright lets work on the security/privacy blog again.
Things I've got in the making right now: dark theme by default, font change and an rss feed!
Let me know what you'd like to see :)
I'll also reveal a new domain name soon!
rant