Skip to content

Commit

Permalink
Set sitemap: false in defaults
Browse files Browse the repository at this point in the history
This change tests whether the fix in jekyll/jekyll#6162 actually
addresses the problem described in jekyll/jekyll-sitemap#180, and finds
that it does _not_ fix the problem.

The problem is that binary files (pdf files in our case) do not inherit
`sitemap: false` like other Jekyll page types do.

The test scenario was simple:

 1. Upgrade to Jekyll 3.5.1, the first version that contains the changes
 in jekyll/jekyll#6162.

 2. Prior to the _config.yml changes in this commit, generate
 _site/sitemap.xml by running `bundle exec jekyll build`. This produces
 the expected result of a complete sitemap.xml wherein all pages are
 included by default.

 3. Copy _site/sitemap.xml => sitemap-before.xml

 4. Apply the changes in this commit and run `bundle exec jekyll build`
 once again. The expected result is an empty sitemap.xml, but the actual
 result is a sitemap.xml that contains no entries except for binary
 files.

 4. Copy _site/sitemap.xml => sitemap-after.xml

 5. `sdiff -w 120 sitemap-before.xml sitemap-after.xml` and paste the
 results into a comment on jekyll/jekyll-sitemap#180.
  • Loading branch information
cbeams committed Aug 6, 2017
1 parent 83260e2 commit e643e1b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ plugins:
- jekyll-redirect-from
- jekyll-feed
- jekyll-sitemap
defaults:
- scope:
path: ""
values:
sitemap: false
feed:
path: blog/feed.atom
include:
Expand Down

0 comments on commit e643e1b

Please sign in to comment.