[Ruby] How to exclude priority, lastmod, changefreq in gem sitemap_generator

less than 1 minute read

Overview

sitemap_generator has default values for priority, lastmod, changefreq by default. Sometimes I don’t want to output these items, so I’ll share the method.

Method

Passing nil to priority, lastmod or changefreq will stop the output.

add'/home', priority: nil, lastmod: nil, changefreq: nil