One Boomer At Large

Site Updates: RSS
 

Sat 17-Feb-2024 13:57:00 MDT
blog: default image

ell, I’ve been pretty busy Well, I’ve been pretty busy over the last couple of months, working on the site and other related things.

One thing that’s been lagging has been converting these blog posts to rss content that can auto-feed to sites like Facebook, X (nee Twitter) or whatever makes sense.

It’s turned out to be a bit of a project, but I think I have it in hand. It basically requires processing and analyzing the original text and the output text to weed out stuff that only confuses rss output. By using a separate process, I can do that: I can read the original text and pull out frontmatter meta-content, and then read the processed text to get the output html.

From there, I can pull the unprocessed content into a dom parser to cull out/reprocess what I can put into rss content.

A simple approach is to use classes to differentiate non-rss-content from rss-content in components. I can tag elements that shouldn’t be in the rss with a norss class, and elements that should be in the rss with a dorss class.

The normal process rendering defines dorss as display:none, so that doesn’t show up in the page. On the external process side, it’s a simple matter to parse the output html section I want (delimited by ‘<rss-begin />’ and ‘<rss-end /> psuedo-elements that I can use to mark substring endpoints and lift out of the output), and remove the elements that contain norss classes.

Voila!

Some refinements are need, but the bones are there.

Onward!

One Boomer At Large
Patreon Facebook Page RSS Feed
<
Loupe
>