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

RSS Feed duplicates the newest post #213

Open
macowie opened this issue Apr 1, 2020 · 7 comments
Open

RSS Feed duplicates the newest post #213

macowie opened this issue Apr 1, 2020 · 7 comments

Comments

@macowie
Copy link

macowie commented Apr 1, 2020

Seems like whatever (Jekyll?) is generating the RSS feed renders the newest post twice -- followed by the next x entries. Which leads to everything getting double entries as a feed reader continually refreshes it.

Here's a sample of the first two entries on the feed currently:

<entry>
<title type="html">Pulling podman images from a container repository</title>
<link href="https://podman.io/blogs/2020/03/31/build-pull-options.html" rel="alternate" type="text/html" title="Pulling podman images from a container repository"/>
<published>2020-03-31T00:00:00+00:00</published>
<updated>2020-03-31T00:00:00+00:00</updated>
<id>
https://podman.io/blogs/2020/03/31/build-pull-options
</id>
<content type="html" xml:base="https://podman.io/blogs/2020/03/31/build-pull-options.html">
<p><img src="https://podman.io/images/podman.svg" alt="podman logo" /></p> <h1 id="pulling-podman-images-from-a-container-repository">Pulling podman images from a container repository</h1> <h2 id="by-tom-sweeney-github-twitter">By Tom Sweeney <a href="https://github.com/TomSweeneyRedhat">GitHub</a> <a href="https://twitter.com/TSweeneyRedHat">Twitter</a></h2> <p>Tom Sweeney has another blog post on the <a href="https://www.redhat.com/sysadmin/">Red Hat Enable Sysadmin</a> site this time he’s writing about <a href="https://www.redhat.com/sysadmin/podman-image-pulling">Pulling podman images from a container repository</a>. Learn the different varities of pull that the <code class="language-plaintext highlighter-rouge">podman build</code> command can use to speed up or further secure your environment in this post.</p>
</content>
<author>
<name>tsweeney</name>
</author>
<category term="containers,"/>
<category term="images,"/>
<category term="docker,"/>
<category term="buildah,"/>
<category term="podman,"/>
<category term="hpc,"/>
<category term="oci,"/>
<category term="networking,"/>
<category term="runtime,"/>
<category term="windows,"/>
<category term="microsoft"/>
<summary type="html">
Pulling podman images from a container repository By Tom Sweeney GitHub Twitter Tom Sweeney has another blog post on the Red Hat Enable Sysadmin site this time he’s writing about Pulling podman images from a container repository. Learn the different varities of pull that the podman build command can use to speed up or further secure your environment in this post.
</summary>
</entry>

<entry>
<title type="html">Pulling podman images from a container repository</title>
<link href="https://podman.io/new/2020/03/31/new.html" rel="alternate" type="text/html" title="Pulling podman images from a container repository"/>
<published>2020-03-31T00:00:00+00:00</published>
<updated>2020-03-31T00:00:00+00:00</updated>
<id>https://podman.io/new/2020/03/31/new</id>
<content type="html" xml:base="https://podman.io/new/2020/03/31/new.html">
<p>Tom Sweeney has another blog post on the <a href="https://www.redhat.com/sysadmin/">Red Hat Enable Sysadmin</a> site this time he’s writing about <a href="https://www.redhat.com/sysadmin/podman-image-pulling">Pulling podman images from a container repository</a>. Learn the different varities of pull that the <code class="language-plaintext highlighter-rouge">podman build</code> command can use to speed up or further secure your environment in this post.</p>
</content>
<author>
<name>tsweeney</name>
</author>
<summary type="html">
Tom Sweeney has another blog post on the Red Hat Enable Sysadmin site this time he’s writing about Pulling podman images from a container repository. Learn the different varities of pull that the podman build command can use to speed up or further secure your environment in this post.
</summary>
</entry>
@TomSweeneyRedHat
Copy link
Member

Thanks for the report @macowie I'll see what we can do, but I'm not a rss heavy.

@TomSweeneyRedHat
Copy link
Member

@macowie I've checked with the folks that set up the rss feed for us and they think the reason you're seeing the "dupes" is a number of our recent posts have been what I call "post links". We add a small blog that shows up on the main page and then a very similar one that will show up in the page that comes up after you click on the "Blogs" button.

When we have someone write an article directly on the site, then you'll see a discernible difference between the notifications.

Hope that helps.

@mbbroberg
Copy link

Hey @TomSweeneyRedHat I looked into this a bit. It's unfortunately not as easy as adding a filter: true or something to fontmatter. It does look like the site could be set up to use collections. The "post links" could be their own type, while posts you wish to share through RSS could be included in a collection and then overwrite the feed.xml file. No clue if it'll work but here's the inspiration: https://github.com/jekyll/jekyll-feed#collections

@TomSweeneyRedHat
Copy link
Member

@mbbroberg thanks for digging into this. I'll be honest and will tell you that I have a very basic knowledge of the rss underpinnings. I'll try to take a look and see what can be adjusted though.

TomSweeneyRedHat added a commit to TomSweeneyRedHat/podman.io_old that referenced this issue Jul 18, 2020
Add cateegories to the Gemfile in hopes to allow users to pick which
category they want to see in their rss feed.  This way they hopefully
won't get a double hit for a blog and it's new post.

Might solve: containers#213

Signed-off-by: TomSweeneyRedHat <[email protected]>
TomSweeneyRedHat added a commit to TomSweeneyRedHat/podman.io_old that referenced this issue Jul 18, 2020
Add categories so that (hopefully) the
rss feed can be categoriezed readers will
be able to select the type of post (new, blogs, talks, etc)
that they'd like to see on their feed.  This
will hopefully help with containers#213

Signed-off-by: TomSweeneyRedHat <[email protected]>
rhatdan pushed a commit that referenced this issue Jul 20, 2020
Add categories so that (hopefully) the
rss feed can be categoriezed readers will
be able to select the type of post (new, blogs, talks, etc)
that they'd like to see on their feed.  This
will hopefully help with #213

Signed-off-by: TomSweeneyRedHat <[email protected]>
@mbbroberg
Copy link

Hey @macowie, the team did some things to mess with Jekyll categories. Did this help the double posting by chance?

@macowie
Copy link
Author

macowie commented Jul 27, 2020

Unfortunately not. You can see in the Feed XML, two entries for each post.

They do have different links. One entry has URL like https://podman.io/blogs/2020/07/18/speed-up-build-with-overlayfs.htm
-- with /blogs/ and a slug but 404s. And the other goes to a URL at /new/ and ending in new.html, https://podman.io/new/2020/07/18/new.html -- and this works and shows the single entry for the blog. This seems to be the case for all of these.

@Krinkle
Copy link

Krinkle commented May 19, 2022

This is still the case fwiw:
Screenshot 2022-05-19 at 18 06 22

From containers/podman.io#256:

Add categories so that (hopefully) the rss feed can be categoriezed and readers will be able to select the type of post (new, blogs, talks, etc).

Unfortunately, this doesn't work.

Firstly, very few RSS readers actually do anything with the category terms in the RSS feed, which means the existing categories don't apply there. Plus, it would remain a bad experience to always get everything double by default.

Secondly, the categories option in jekyll-feed isn't for adding category terms to the RSS feed. These terms are enabled always and don't require setting an option. Rather, the categories option is for generating entirely separate RSS feed files just for that particular category. However, without a link to them and some way for users to know where they exist, they might as well not exist. Plus, even if it worked, it would mean you'd have to add five links to the website sidebar and users would have to manually add four (all except news) one by one to their RSS reader in order to subscribe.

Short of forking the plugin or re-creating a feed ad-hoc, it seems the most straight forward solution would be to phase out the "new" concept if that is possible. I've looked around a bit on the site and it seems like what you might want is for the homepage to iterate all posts regardless of category (like the feed does), instead of limiting itself to only the new category and thus having to create a duplicate for every "release" and "blog" post in the "new" category.

Alternatively, if there is still a use for posts that show only on the homepage and have no equivalant post on the site (e.g. a link to something external) then those could perhaps reside in the "blog" category or remain in the "new" category as today (perhaps rename to "link"), with use of that limited only to external links. That way the homepage can be simplified to ierating all posts by date, and not start showing things twice there as well.

Another issue due to this "new" duplication right now is the sometimes odd styling we see on the Podman homepage, as there is a clash between the layout of the homepage (it inherits the same layout as for the blog index) and the oversized content in the "new" pages that gets included via page.excerpt, as well as the odd navigation pattern where there are three links that all point to differnet indirect places to end up in the same place. Also, the "excerpt" that some blog posts have for the blog index is currently not used on the homepage (unless that is duplicated), same for an automatic "read more" link.

Currently Probably intended / Proposed
Screenshot 2022-05-19 at 18 44 31 Screenshot 2022-05-19 at 18 53 11

By not creating (duplicate) "new" entries at all, and letting the homepage iterate all posts automatically, I believe you would simplify maintenance, improve homepage UX issues (per above), fix the feed bug, and yet keep all URLs compatible.

Having said, I imagine this came about for a reason, so perhaps it's not so simple :-). One thing that's also possible is reserving a tag like "hidden" in case we want to add a post to releases/talks/blogs without being promoted on the homepage, we'd then skip posts with that tag when iterating the homepage. Or alternatively, invert it and add someting like "featured" or "new" to all existing posts (there can be more than one tag on a post), and iterate that on the home page.

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

No branches or pull requests

4 participants