In the Front Matter Defaults documentation, there is written:
Since the path is set as an empty string, it will apply to all files in your project. You probably don’t want to set a layout on every file in your project - like css files, for example - so you can also specify a
type
value under thescope
key.
So we specify a file type
.
Later on, we put the following in our _config.yml
:
defaults:
[...]
-
scope:
path: "projects"
type: "pages" # previously `page` in Jekyll 2.2.
values:
layout: "project" # overrides previous default layout
author: "Mr. Hyde"
So we apply this default to file of type pages
.
But what is a “page” to begin with? How does a file acquire the type of “page”?
I thought a “page” was a HTML or MD file residing under _pages
(see the step-by-step tutorial).
But that is not the case, since in this case they reside under “projects”.
how does jekyll tell which file in “projects” is of a “page” type?
Any html files that exist in the
projects/
folder will use theproject
layout, if it exists.
So any HTML file under projects
will use the project
layout.
So a page
is any HTML file. So what is a post
? Is it not a HTML also?