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

Template says Atom, but is actually RSS standard based #60

Open
dewey opened this issue Jul 3, 2024 · 5 comments
Open

Template says Atom, but is actually RSS standard based #60

dewey opened this issue Jul 3, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@dewey
Copy link

dewey commented Jul 3, 2024

Hey, thanks for the plugin, I'm just setting it up for my Kirby blog. While porting my existing feed to Kirby I noticed that right now the rss.php snippet uses <guid> as the unique identifier of an entry. I believe this should be <id> according to the Atom spec, which is set as the content type here. The <guid> element is from the RSS standard, not Atom.

There's some other fields too that are not from the Atom standard like the <link> element which should be in the following format: <link href="http://example.org/2003/12/13/atom03"/>, same for pubDate which is <published>2003-12-13T09:17:51-08:00</published> in Atom.

Edit: When I reported this first I thought it's just the guid / id issue but then realized the whole template is actually wrong. Maybe it would be best to change the content type there to be RSS and add a second atom.php template?

@dewey dewey changed the title <guid> should be <id> Template says Atom, but is actually RSS standard based Jul 3, 2024
@bnomei
Copy link
Owner

bnomei commented Aug 17, 2024

hi @dewey

thanks for reporting the issue. adding a seperate atom template seems to be the best choice indeed. i will try to get it done asap.

@bnomei bnomei self-assigned this Aug 19, 2024
@bnomei bnomei added the bug Something isn't working label Aug 19, 2024
@bnomei
Copy link
Owner

bnomei commented Aug 19, 2024

@dewey can you test again with v.1.7.0? thanks

@bnomei
Copy link
Owner

bnomei commented Aug 19, 2024

i added a feed/atomsnippet

@dewey
Copy link
Author

dewey commented Aug 19, 2024

Thank you, I'll test it in two weeks when I'm back on my computer!

@dewey
Copy link
Author

dewey commented Sep 5, 2024

Hey @bnomei

I took a look and there seems to be a small issue:

[Thu Sep  5 20:57:26 2024] TypeError: date(): Argument #2 ($timestamp) must be of type ?int, string given in /Users/philipp/repos/github.com/dewey/blog.notmyhostna.me/site/plugins/kirby3-feed/snippets/feed/atom.php:5
Stack trace:
#0 /Users/philipp/repos/github.com/dewey/blog.notmyhostna.me/site/plugins/kirby3-feed/snippets/feed/atom.php(5): date('r', 'Fri, 30 Aug 202...')

I'm not sure where it's coming from as $modified should be an int already?

Screenshot 2024-09-05 at 21 17 07 png@2x

Additionally I think what would be great:

  1. What do you think about adding an <author> element?

  2. Having the original published timestamp, not just the updated timestamp:

<published><?= $item->date()->toDate('c') ?></published>

  1. It would be nice to have a Content section not just a summary one, for feeds that have the full text of the blog post. In my case I did that with:
      <content type="html" xml:lang="en">
        <![CDATA[<?= $item->blocks()->toBlocks() ?>]]>
      </content>

Let me know what you think!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants