Configuration

Bedrock takes a default configuration which lives in core/discovery/config.js. You can modify the configuration with your own values in the bedrock.config.js file in the root folder.

Parent Object Sub object Possible values Effect Since
pageTree layoutStyle sidebar (Options: sidebar or fixed). Can also be set to false. Sets the layout type for the page tree. Sidebar implements a wrapper div that wraps the whole site; the sidebar will be next to the site. Using fixed the page tree is rendered on the right side and is fixed positioned. No wrapper div is rendered. This can be handier for delivery. Setting to false will not render anything at all. 1.35
pageTree title Default: Prototype navigation (String) Sets the title that shows up in the page tree on the top. 1.40
js minify true/false (Boolean) Enable or disable JS minification 1.35
css purge true/false (Boolean) Enable or disable purgeCSS 1.35
css minify true/false (Boolean) Enable or disable CSS minification 1.35
css compiler scss/postcss/ (Boolean) Choose your CSS compiler: Sass (SCSS) or PostCSS. For postcss, use files in content/postcss. For SCSS use files in content/scss. 1.35
styleguide   true/false (Boolean) Enable or disable the style guide
styleguide title Default: Styleguide (String) Sets the title for the style guide 1.40
styleguide url Default: /styleguide (String) Sets the URL for the style guide 1.40
styleguide homepage Default: /styleguide/docs/introduction.html (String) Sets the URL for the style guide home page. This is the page people land on when they click “Styleguide” in the page tree (If you keep it at its default name) 1.40
styleguide snippetlanguage html, pug This modifies the language snippets shown in the styleguide.
styleguide colors ./content/scss/_settings.colors.scss Path to the SCSS file specifying colors (for the color feature in the styleguide which shows the project’s colors in a visual way).
styleguide categoryOrder Example:

 

categoryOrder: [
  'Style guide',
  'Patterns',
  'Overviews',
  'Components',
],
Order of the documentation categories.
styleguide componentCategories Example:

 

componentCategories: {
  b: 'Bootstrap additions',
  bc: 'Bootstrap custom components',
  br: 'Bedrock components',
  c: 'Custom components'
}
Which component categories should exist.
codeSamples jsx false Whether the styleguide should have a “Copy as JSX” button for code samples 1.39
icons generateIconFont true/false (Defaults to false) Specify whether to generate an icon font.
icons svgIconClassPrefix Example: svg-icon (String) Specify the CSS class for direct SVG icons.
icons iconFontClassPrefix Example: if (String) Specify the CSS class for icon font icons.
icons iconFontPath Example: "./content/scss/_icon-font.scss" (String) Specify the path where icon font CSS gets generated. Note that this is untested with the new PostCSS feature in 1.34.

Deprecated config items

Parent Object Sub object Possible values Effect Removed when?
icons hasSvgIcons true/false Specify whether to enable SVG icon support. 1.10
purgeCSS true/false Enable/disable purge (now part of the css object). 1.35