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

Generate atom.xml for Blog section #84

Closed
derberg opened this issue Apr 24, 2020 · 12 comments
Closed

Generate atom.xml for Blog section #84

derberg opened this issue Apr 24, 2020 · 12 comments

Comments

@derberg
Copy link
Member

derberg commented Apr 24, 2020

Reason/Context

There are people out there that use feeds readers tools, but not only. I, for example, use https://blogtrottr.com/ to get an email whenever there is new post in GitHub Blog. We should enable users to subscribe to just Blog section if they do not want to subscribe to Newsletter, follow twitter or join Slack.

Description

  • Use Hugo plugins to make sure atom.xml is always regenerated during the build
  • Add somewhere well-recognized icon that indicates feeds are exposed
  • In case we have Google Search Console already enabled, make sure our feed file is configured there the same way as sitemap.xml
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 30 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation.
Thank you for your contributions ❤️

@github-actions github-actions bot added the stale label Jun 27, 2020
@derberg derberg removed the stale label Jul 27, 2020
@derberg derberg reopened this Jul 27, 2020
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 30 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation.
Thank you for your contributions ❤️

@github-actions github-actions bot added the stale label Sep 26, 2020
@derberg derberg removed the stale label Sep 28, 2020
@JakubIwanowski
Copy link

You moved your website form Hugo to Next.js, right? Maybe something like this would work: https://github.com/rauchg/blog/blob/master/lib/atom.js

The posts would have to be filtered of course, by "sectionSlug", perhaps? Plus other changes, so the atom feed link is available on the website.

@derberg
Copy link
Member Author

derberg commented Oct 5, 2020

@JakubIwanowski yes, last week we moved to Next.js. We do not have strong requirement for Atom, so if there is something better already for Next.js for rss feeds, feel free to use it.

I'm not a fan of https://github.com/rauchg/blog/blob/master/lib/atom.js as this would require us to maintain a separate json file with list of blog posts.

@derberg
Copy link
Member Author

derberg commented Oct 6, 2020

@JakubIwanowski sorry, I was not behind building the website, I'm new to Next.js and just learned that actually the config file is maintained by default by Next.js so yeap, looks like what you linked is a good idea and https://github.com/asyncapi/website/blob/master/config/posts.json would be what you would have to read to get list of posts

@JakubIwanowski
Copy link

Alright!

@JakubIwanowski
Copy link

So the atom feed looks like this for now:

<title>AsyncApi Initiative</title>
<subtitle>Blog</subtitle>
<link href="https://asyncapi.com/feed" rel="self"/>
<link href="https://asyncapi.com/"/>
<updated>2020-09-30T05:00:00.000Z</updated>
<id>https://asyncapi.com/</id>
<author>
  <name>AsyncApi Initiative</name>
  <email>mail@mail.com</email>
</author>
    <entry>
      <title>AsyncAPI @Hacktoberfest</title>
      <link href="https://asyncapi.com//blog/hacktoberfest-2020"/>
      <updated>2020-09-30T05:00:00.000Z</updated>
      <summary>What is AsyncAPI AsyncAPI is a specification for describing your event-driven architecture. You are probably using already OpenAPI/Swagger specification for describing your synchronous RESTful APIs. A</summary>
    </entry>
...
</feed>

It shows 10 latest posts from the blog section. The script is run on build :

"build": "node scripts/build-post-list.js && node scripts/atom.js && next build",

Do you want me to to change/add/delete something from the feed?

@derberg
Copy link
Member Author

derberg commented Oct 12, 2020

looks good, would suggest few things though:

  1. These lines are missing at the beginning of the feed
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  1. This <link href="https://asyncapi.com/feed" rel="self"/> could probably be <link href="/feed" rel="self"/>. And what about the xml extension?
  2. According to https://validator.w3.org/feed/check.cgi you should also generate id attribute per entry

I'd like to have all posts in the feed, not just the last 10

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 30 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation.
Thank you for your contributions ❤️

@github-actions github-actions bot added the stale label Dec 12, 2020
@derberg derberg removed the stale label Dec 14, 2020
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 60 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation.
Thank you for your contributions ❤️

@github-actions github-actions bot added the stale label Feb 13, 2021
@derberg derberg removed the stale label Feb 15, 2021
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 60 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation.
Thank you for your contributions ❤️

@github-actions github-actions bot added the stale label Apr 17, 2021
@derberg derberg removed the stale label Apr 18, 2021
@derberg
Copy link
Member Author

derberg commented Apr 29, 2021

Done thanks to @MikeRalphson
#235

@derberg derberg closed this as completed Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants