How to get RSS set up on non-post pages.02 Sep 2020
I am a new user of RSS, and I wanted to set it up on my website. The template I use allows this easily in an
atom.xml file for blog posts. But I have longer form writing at another part of the site that I would want to include too, but not all of it, from the beginning of time. Ok, so the file looked like this from the template:
(I am posting an image, because otherwise the html will be filled in with all of the values of this site. Anyone have a solution to display literal html code? PLEASE let me know, I hate this workaround.)
So this atom.xml file will automatically update RSS feeds with new content from a
_posts folder. I have one of those.
adding to the atom.xml file, new layout!
So I had the idea that I could introduce a new layout, and the pages with this layout would get added to the feed. The layout is
indexedpage, and the additional content to
atom.xml is :
and the full file (but text, so again, it will not fill in the values of this site) is here.
The new layout.
indexedpage layout basically copies from the
page layout I am using for my longer-form posts.
Use the layout in a page, with a date.
Then try to use the new layout in a page. The date for RSS must be in the YYYY-MM-DD format, as I learned. Otherwise, specify your layout, title, and date, and you’re good to go. Test with an RSS feed reader such as FeedBro, which you can test even locally.
I like this solution, because I can choose which items get put in the RSS feed, or not. Some you may want to go straight to the feed, others to sit for a few days, whatever. Then change the layout (which is really a flag, doesn’t really change formatting), and it is in the feed.
© Amy Tabb 2018-2021. All rights reserved. The contents of this site reflect my personal perspectives and not those of any other entity.