-
Notifications
You must be signed in to change notification settings - Fork 163
Configuration
The configuration of a website is stored in the file _config.yml
the contents of this file:
pretzel:
engine: liquid
The engine used for managing the website is liquid in this example.
Exclude items from being included when (re)generating the site (bake and taste command)
exclude:
- bootstrap\less\
- .gitignore
- .git
- taste.bat
- Pretzel.exe
Where the excluded file is the entire path of a file or a folder.
Ignoring a file: - example.ext
would not include the root file that is named example.ext
.
Ignoring a folder: - bootstrap\less\
ignores all files in the folder bootstrap\less\
.
You can choose to use categories only from frontmatter and not from frontmatter and _posts folder path.
only_frontmatter_categories: true
In some cases you may want to change some behavior during building your pages for different environments. For example, once you build release
version of your website you may want to add links to CDN instead of local files. There is many other scenarios where you can adjust some behavior.
There is configuration
parameter which you can pass when run pretzel.exe
. For example:
pretzel.exe bake -s=... --destination=... --configuration=debug
and
pretzel.exe bake -s=... --destination=... --configuration=release
Once you do that, you'll be able to access it through site.configuration
variable. For example, you can add some if
at your templates or just display current configuration:
{% if site.configuration == "release" -%}
<strong>Warning!</strong> Now is release configuration.
{% endif -%}
<p>Current configuration is <strong>{{ site.configuration }}</strong></p>