Sitemap XML filtered feed

The sitemap plugin will list any item in sitemenus. I’m trying to filter those items base on a property on the document that relates to the sitemenu item. I created a SEO compound type with a noindex property. Whenever this property is set to true, the sitemap plugin shouldn’t list the URL to this document in the sitemap.xml. In other words this document is ignored.

I was thinking about two parts of a solution for this use case and wanted to check if this is a good solution or if there’s already a solution for this problem.

  1. Create a Workflow that subscribes to publication events of a document. Every time a document is (un)published the trigger will fire an action that checks if this noindex property is true. If so the document will be added (if not already present) to a blacklist in the JCR. If the value is false the document will be removed (if present) from the blacklist in the JCR. While filling the sitemap it’ll check if there are blacklisted document which need to be ignored.
  2. The first solution will still apply but won’t be triggered when documents are imported or deleted through the console. Therefore a cronjob has to be made in order to update the blacklist as described in the first solution.

What are your thoughts about this solution and is there a better way to solve this?

Sorry @Tom_Oud, apparently nobody in this community has any useful feedback for you.