Skip to content
This repository was archived by the owner on Jun 25, 2020. It is now read-only.

Configuration

Sergey Zwezdin edited this page Jul 2, 2016 · 11 revisions

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

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\.

Use categories from frontmatter only

You can choose to use categories only from frontmatter and not from frontmatter and _posts folder path.

only_frontmatter_categories: true

Environments

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>
Clone this wiki locally