Configure your site metadata, rendering configuration and such using YAML configuration. Create a foo.yaml
alongside foo.md
(see Folder notes) or foo/
folder, and those settings apply only to that route. The YAML structure is the same as your Markdown frontmatter, and vice-versa. Settings in the YAML frontmatter apply onto that Markdown route only; whereas settings in an individual .yaml file apply to that entire sub-route tree. Emanote does a deep-merge of the parent YAML configurations, so you can have children override only what’s necessary. This is sometimes known as “data cascade”. The final merged YAML structure is passed to the HTML templates, of which you have full rendering control over.
Notice how this page’s sidebar colorscheme has changed to green? View the source of this page to see the magic involved. That CSS greenery you just saw too comes from YAML.
You can reference the YAML frontmatter config from HTML Templates. See here for details.
Special properties
-
page.image
: The image to use for the page. This is used for the Open Graph Protocol (OGP) meta tagog:image
meta tag. If not specified, the first image in the page is used. Relative URLs are automatically rewritten to absolute URLs ifpage.siteUrl
is non-empty. -
date
: The note timestamp. This is used to order note chronologically, such as for the timeline query. The value can be set from the filename if it begins withYYYY-MM-DD
, which is useful for including the date in the note URL. In case of conflict, the date from the YAML configuration takes priority.