Configuration Options
The tables below list the available settings for Bridgetown, and the various options
(specified in the configuration file) and flags
(specified on the command-line) that control them.
Global Configuration #
Setting |
|
---|---|
Site Source Change the directory where Bridgetown will read files Default: |
|
Site Destination Change the directory where Bridgetown will write files Default: |
|
Template Engine Change the template engine Bridgetown uses by default to process content files. Default: |
|
Permalink Change the default permalink style or template used by pages & blog posts. Documentation here and read this additional information. |
|
Slugify Mode Determine the method of transforming characters when slugs are generated. Info on available options here. Default: |
|
Disable Disk Cache
Disable caching of content to disk in order to skip creating a
|
|
Exclude Exclude directories and/or files from the conversion. These exclusions are relative to the site's source directory and cannot be outside the source directory. |
|
Include
Force inclusion of directories and/or files in the conversion.
|
|
Keep files
When clobbering the site destination, keep the selected files.
Useful for files that are not generated by bridgetown; e.g. files or
assets that are generated by your build tool.
The paths are relative to the |
|
Additional Watch Paths Supply additional directories not normally covered by Bridgetown or Zeitwerk's autoloader to the file watcher to trigger a rebuild/reload. The paths are relative to the site root (but you can also provide absolute paths). |
|
Time Zone
Set the time zone for site generation. This sets the |
|
Encoding
Set the encoding of files by name. The default value is |
|
Defaults Set defaults for front matter variables. |
Destination folders are cleaned upon site builds
The contents of destination
are automatically cleaned when the site is built.
Files or folders that are not created by your site will be removed. If you need to
retain certain files/folders, specify them within the keep_files
configuration
directive. (For instance, Bridgetown automatically keeps compiled frontend assets
from esbuild.)
Do not use an important location for destination
instead, use it as
a staging area and copy files from there to your web server.
Build Command Options #
Setting | |
---|---|
Regeneration Enable auto-regeneration of the site when files are modified. |
|
Configuration Specify config files instead of using |
|
Environment Use a specific environment value in the build. |
|
Future Publish posts or collection documents with a future date. |
|
Unpublished Render posts that were marked as unpublished. |
|
Ruby Front Matter Process Ruby front matter (default true) |
|
Force polling Force watch to use polling. |
|
Verbose output Print verbose output. |
|
Silence Output Silence the normal output from Bridgetown during a build |
|
Liquid profiler Generate a Liquid rendering profile to help you identify performance bottlenecks. |
|
Strict Front Matter Cause a build to fail if there is a YAML syntax error in a page's front matter. |
|
Base Path Serve the website from the given base path. |
|
Do not use tabs in configuration files
This will either lead to parsing errors, or Bridgetown will revert to the default settings. Use spaces instead.
Additional Configuration File Settings #
Bridgetown runs with the following configuration options by default. Alternative
settings for these options can be explicitly specified in the bridgetown.config.yml
configuration file.
Note that if you change plugins_dir
, the option is relative to the current working directory, not the content source folder (aka src
). Other *_dir
options are relative to the source folder.
# Where things are
plugins_dir : plugins
collections_dir : .
layouts_dir : _layouts
components_dir : _components
islands_dir : _islands
partials_dir : _partials
cache_dir : .bridgetown-cache
collections:
posts:
output : true
additional_watch_paths: []
# Handling Reading
include : [".htaccess", "_redirects", ".well-known"]
keep_files : [".git", ".svn", "_bridgetown"]
encoding : "utf-8"
markdown_ext : "markdown,mkdown,mkdn,mkd,md"
strict_front_matter : false
# Filtering Content
future : false
unpublished : false
# Conversion
markdown : kramdown
highlighter : rouge
# System
timezone : null # e.g. America/Los_Angeles
quiet : false
verbose : false
defaults : []
liquid:
error_mode : warn
strict_filters : false
strict_variables : false
# Markdown Processor
kramdown:
auto_ids : true
entity_output : as_char
toc_levels : [1, 2, 3, 4, 5, 6]
smart_quotes : lsquo,rsquo,ldquo,rdquo
input : GFM
hard_wrap : false
guess_lang : true
footnote_nr : 1
show_warnings : false
include_extraction_tags: false
mark_highlighting : true