bobdenotter / sitemap

Provide a sitemap (.xml) for your Bolt 4 site
MIT License
5 stars 4 forks source link

Allow records to be excluded #13

Closed fisch42 closed 2 years ago

fisch42 commented 2 years ago

I needed the ability to exclude records from the sitemap without setting viewless: true. This code is implemented like the code from this pull request to disable listings in the sitemap.

Example contentType definition in contenttypes.yaml:

pages:
    hide_records_from_xml_sitemap: true
xiaohutai commented 2 years ago

With #14, I made this an option in sitemap's config (bobdenotter-sitemap.yaml instead of contenttypes.yaml). The other fix you did for hiding listings should remain working, but also has the option now in sitemap's config, i.e.:

exclude_contenttypes: ["pages"]
exclude_listings: ["pages"]