jekyll / jekyll-sitemap

Jekyll plugin to silently generate a sitemaps.org compliant sitemap for your Jekyll site
http://rubygems.org/gems/jekyll-sitemap
MIT License
949 stars 134 forks source link

Default Sitemap False not working #250

Closed harryray closed 4 years ago

harryray commented 4 years ago

Hey guys,

I'm running Jekyll 3.8.5 and Jekyll Sitemap 1.2.0, and I'm trying to use default front matter to exclude pages from our sitemap. There's a lot of pages that need excluding, so doing this individually isn't really an option at the moment.

Here's the code I'm using:

defaults:
  - scope:
      path: "sites/all"
    values:
      sitemap: false
  - scope:
      path: "sites/example-site.co.uk.blog"
    values:
      sitemap: false
  - scope:
      path: "sites/example-site.co.uk"
    values:
      sitemap: false
  - scope:
      path: "terms"
    values:
      sitemap: false

Unfortunately, everything in the terms/ folder is still being included.

I've tried using path: "terms/", path: "/terms/*" and path: "/terms/" but the sitemap still includes terms files.

Any ideas?

Thanks!

harryray commented 4 years ago

Nevermind -- Resolved.

Needed to use pre-compile filepaths rather than the filepaths that are generated after the site is compiled.