Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RSS support for Blog entries #19

Merged
merged 6 commits into from
Oct 30, 2024
Merged

Add RSS support for Blog entries #19

merged 6 commits into from
Oct 30, 2024

Conversation

msurdi
Copy link
Contributor

@msurdi msurdi commented Jun 8, 2024

πŸ”— Linked issue

❓ Type of change

  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

I wanted to subscribe to your blog using an RSS feed reader and noticed there was no feed for the blog. Here's a quick implementation for adding it.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@Julien-R44
Copy link
Member

Cool thing to have! Thanks for the PR

Looks good to me. @thetutlage any thoughts ?

@RomainLanz
Copy link
Member

Hey @msurdi! πŸ‘‹πŸ»

Thanks for this PR.

Since we are dumping the whole article content, the file will probably grow big.

Wouldn't it be better only to display the title and a summary?

@msurdi
Copy link
Contributor Author

msurdi commented Oct 23, 2024

Hi @RomainLanz! Thanks a lot for taking some time to review this.

I think it's nice to have the full article, so that you can read the posts without leaving your news reader. But I agree the size of this can get quickly out of hand.

I've just pushed a commit where I instead limited the number of posts to the latest 20 available. Would that work?

I'm happy to truncate the content if you still think it's necessary and there's no way around that.

Thanks!

@thetutlage
Copy link
Member

I think its fine to have all the contents for now, since we don't have many posts. Later we can see if we want to something different once we start to hit any sort of limits

@thetutlage
Copy link
Member

We will also have to update the build:static command and write the blog.xml file on the disk, since the production site is a static output. https://github.com/adonisjs/adonisjs.com/blob/main/commands/build_static.ts

@RomainLanz
Copy link
Member

I think its fine to have all the contents for now, since we don't have many posts.

Agreed.

One question though: do most RSS readers support JavaScript? Since we might have custom components in those articles, they could potentially break in RSS readers if JavaScript isn’t handled.

@thetutlage
Copy link
Member

To be honest, I have not used any RSS readers recently. So yeah, we should give a test run once and see what the ideal experience will be

@msurdi
Copy link
Contributor Author

msurdi commented Oct 24, 2024

@thetutlage I've just added the static generation step for the feed.

Let me know if there is anything else I can do here.

Thanks πŸ™

resources/views/feeds/blog.edge Outdated Show resolved Hide resolved
resources/views/feeds/blog.edge Outdated Show resolved Hide resolved
resources/views/feeds/blog.edge Outdated Show resolved Hide resolved
@msurdi
Copy link
Contributor Author

msurdi commented Oct 27, 2024

All suggested changes applied.

Copy link
Member

@RomainLanz RomainLanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@RomainLanz RomainLanz merged commit 2c2b2b9 into adonisjs:main Oct 30, 2024
@RomainLanz
Copy link
Member

Thanks!

@RomainLanz
Copy link
Member

It looks like the generated feed has some issues: https://www.rssboard.org/rss-validator/check.cgi?url=https%3A%2F%2Fadonisjs.com%2F

Can you have a look at it? @msurdi

@msurdi
Copy link
Contributor Author

msurdi commented Oct 30, 2024

Sure, I’ll check this over the weekend.

@msurdi msurdi mentioned this pull request Nov 1, 2024
6 tasks
@msurdi
Copy link
Contributor Author

msurdi commented Nov 1, 2024

@RomainLanz just opened #28 to address these issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants