Config File

_cobalt.yml let's you specify site-wide options as well as defaults for pages.

Default _cobalt.yml:

# Build options
source: "."
  - md
  - liquid
include_drafts: false
destination: _site

# Site options
  title: ~
  description: ~
  base_url: ~
  sitemap: ~
  data: ~

# Page/Post options
  excerpt_separator: "\n\n"
  is_draft: false
  theme: "base16-ocean.dark"
  enabled: true
    style: Nested
  default: {}
  title: ~
  description: ~
  dir: posts
  drafts_dir: _drafts
  order: Desc
  rss: ~
  jsonfeed: ~
  publish_date_in_filename: true
  default: {}

Build options

sourceStringDirectory, relative to _cobalt.yml, where content lives.
template_extensionsList of StringsFile extensions that mark a file as a page as compared to an asset.
include_draftsBooleanSpecifies whether posts marked is_draft should be generated by default. This can be overridden with command line flags.
ignoreList of StringsSpecifies what files should be ignored by Cobalt by way gitignore patterns, relative to source.
destinationStringDirectory, relative to _cobalt.yml, where the output is written to.

For example to unignore the .well-known/ folder used in LetsEncrypt, add this to your _cobalt.yml.

  - "!.well-known"
  - "!.well-known/**/*"

Site options

These are all under site: in the yaml:

titleStringThe title for the site
descriptionStringA description for the site
base_urlStringThe root for the site. This is used in making paths absolute for RSS as well as in Liquid ({{ site.base_url }}/docs).
sitemapStringRelative path for where to generate a sitemap XML file.
dataObjectValues made available via the {{ }} variable.

In addition to changing the defaults through CLI arguments/flags, Cobalt allows to specify a config file (default: _cobalt.yml) where you can store such settings.

Pages and Posts

Global options:

defaultFrontmatterSite-wide defaults for page frontmatters.
syntax_highlightSite-wide syntax highlighting settings
- themeStringSite-wide syntax highlighting theme. Run cobalt debug highlight themes for list of available themes
- enabledBooleanEnables or disables site-wide syntax highlighting

These are under pages: in the yaml:

defaultFrontmatterDefaults for page frontmatters.

These are under posts: in the yaml:

titleStringTitle for the posts collection. Falls back to site.title if not present.
descriptionStringDescription for the posts collection. Falls back to site.description if not present.
dirStringDirectory, relative to source, where posts lives.
drafts_dirBooleanDirectory, relative to source, where draft posts can live.
orderAsc, DescSort order for {{posts}} variable.
rssStringPath for a posts RSS file.
jsonfeedStringPath for a posts jsonfeed file.
defaultFrontmatterDefaults for post frontmatters.
publish_date_in_filenameBooleanPrepend YYYY-MM-DD- to filename on publish

These are under assets: in the yaml:

sassSass' CSS generation settings
- styleNested, Expanded, Compact, CompressedSite-wide format style for Sass-generated CSS.