Anything you need to configure, you can configure in simple, human-friendly yaml.
barely tries to make as much config work as possible superfluous. All you "need" (actually, you don't...) to configure are some metadata parameters, and some plugins that are not enabled by default if you want to use them.
read full documentationIn addition to your webroot and devroot, which get auto-configured when you set up the project, barely is configured with these default values:
1 2 3 4 5 6 7 8 | TEMPLATES_DIR: templates PAGE_EXT: md IMAGE_EXT: - jpg - jpeg - png IGNORE: - .git |
Here you also configure plugins. Note: if you change this config file, you will need to restart barely for the changes to take effect.
This is the place for:
Inside of every markdown file, you can specify variables to be used either in some plugin, or in your templates. To do so, the first line of the file has to be ---
, and the same delimiter has to be used before any markdown content.
Inbetween the delimiters, you can use normal YAML syntax:
1 2 3 4 5 6 7 | --- title: "Page title for use in a template!" description: "..." nested: - "value" - "something else" --- |
Don't forget ---
right before and after.
These variables can be used like any others in your templates: {{ title }}
.
Sometimes, plugins expect (or allow) for configuration on a page level (e.g. the Highlight plugin). Additionally, barely pays attention to two page level configurations:
1 2 | extension: specify a extension different from html (without a leading dot). E.g.: php, xml,... publish: if set to false, this page will not be rendered. Useful for drafting. |
If two identical variable names exist in metadata.yaml and inside a page itself, the page-level variable overrides the global one.