Another one-PR patch update, though without the same lessons as for the previous release.

This release includes a beneficial change for a number of plugins: static files now respect front matter defaults.

You might be asking yourself: “why would static files, files that are static files explicitly because they don’t have YAML front matter, want to respect YAML front matter?” That’s a great question. Let me illustrate with an example.

Let’s look at jekyll-sitemap. This plugin generates a list of documents, pages, and static files, and some metadata for them in an XML file for a Google/Yahoo/Bing/DuckDuckGo crawler to consume. If you don’t want a given file in this list, you set sitemap: false in the YAML front matter. But what about static files, which don’t have YAML front matter? Before this release, they could not be excluded because they had no properties in YAML other than the ones we explicitly assigned. So if you had a PDF you didn’t want to be in your sitemap, you couldn’t use jekyll-sitemap.

With this release, you can now set front matter defaults for static files:

      path: "pdfs/"
      sitemap: false

Now, for every file in the Liquid site.static_files loop which is in the folder pdfs/, you’ll see sitemap equal to false.

Many thanks to @benbalter for coming up with the solution and ensuring sitemaps everywhere are filled with just the right content.

As always, if you notice any bugs, please search the issues and file one if you can’t find another related to your issue.

Happy Jekylling!