todogroup / todogroup.org

Official TODO Website that containts TODO Guides, OSPO use cases and more resources to advance in the OSPO journey
http://todogroup.org
Other
242 stars 125 forks source link

Custom RSS feed #404

Closed thetwopct closed 1 year ago

thetwopct commented 1 year ago

I've implemented a custom RSS feed to fix the issue that was experience by Chrome users when clicking directly on the RSS feed link - #401

This page contains the following errors: error on line 4 at column 868: Entity 'rsquo' not defined

Note:

The custom feed shows blog posts only. It implements some custom find and replace to remove some HTML entities that were being flagged by XML Validator. There may be a better approach or a "Hugo" way of doing this, but I couldn't find it.

The feed is now a "valid" RSS feed and the error has gone from Chrome.

Screenshot-2023-10-19 --20 21 38

Screenshot-2023-10-19 --20 22 11@2x

cjyabraham commented 1 year ago

So do you have a sense this is an underlying Hugo issue that becomes a problem when people use unusual characters? If so, should we submit upstream to Hugo?

thetwopct commented 1 year ago

So do you have a sense this is an underlying Hugo issue that becomes a problem when people use unusual characters? If so, should we submit upstream to Hugo?

From what I can understand this issue is happening because we're using default text transformer (Goldmark) and that adds the html entities, and we can't turn them off just for RSS feeds. This threads suggestions didn't fix the issue with XML validation, this bash script looked overkill, so just did a find replace based on the html entities that are causing problems.