I was trying to set different layouts depending on the directory of the pages, like:
defaults:
-
scope:
path: ""
type: "pages"
values:
layout: "default"
-
scope:
path: "www/grid"
type: "pages"
values:
layout: "grid"
-
scope:
path: "www/product"
type: "pages"
values:
layout: "product"
As recommended, I saved the _config.yml
file, stopped and rerun the jekyll serve
command. Yet, after reloading the pages, nothing seemed affected.
To solve the problem, I:
_config.yml
filejekyll serve
command.jekyll-metadata
filejekyll serve
commandAfter that everything worked fine.
The
.jekyll-metadata
(which I assume is some cache) file is rebuilt after theserve
command.