3

I am setting the defaults in my _config.yml file but they are not being picked up:

defaults:
  -
    scope:
      path: ""
      type: "posts"
    values:
      layout: "post"

I am comparing it with another Jekyll site that I maintain where my sitewide frontmatter defaults are working as expected. What gives?

shivam
  • 16,048
  • 3
  • 56
  • 71
joe sepi
  • 579
  • 1
  • 4
  • 9

2 Answers2

0

I found that running bundle update (assuming you use Bundler) fixed the problem. I don't think that the gems were that old, but it looks like I upgraded liquid, which I suspect was the issue:

Using liquid 2.6.2 (was 2.5.5)

joe sepi
  • 579
  • 1
  • 4
  • 9
  • I don't think that was it. I seem to be using liquid 2.5.5 and that works as expected, with very similar settings. – Rudy Velthuis Mar 27 '15 at 00:36
  • Hmm. I don't know what happened then. Odd. Thanks for chiming in. – joe sepi Mar 28 '15 at 01:31
  • I just ran into the same problem: I had "jekyll serve" running locally and rebuilding continuously. Simply stopping it and re-running "jekyll serve" from scratch was the solution in my case: for certain changes, it seems that regeneration doesn't quite catch all the changes. – Steve Heim May 26 '15 at 10:33
0

Have you tried running jekyll clean before serve your server?

Or you can manually remove _site and .jekyll-cache folders and .jekyll-metadata file. Then Jekyll will generate site with defaults.

Shiny
  • 583
  • 4
  • 16