Version 0.7.0 has been released! See the release announcement for more information.

Also, if you like BluestNight, please consider supporting its development.

BluestNight uses the following font families:

By default, Clear Sans is used for all text on the on the web page except for <code> and <pre> blocks, which use Source Code Pro, and any text inside of the custom font shortcodes. Alegreya is used by default for text when a page is printed. Zilla Slab used to be the only serif font offered and is still provided for those who prefer it to Alegreya.

These defaults can be modified, though, through the use of four configuration properties and two shortcodes.

Change Default Font Families

[params.fonts]
  header_style = "sans-serif"
  body_style = "sans-serif"
  print_header_style = "slab-serif"
  print_body_style = "serif"
params:
    fonts:
        header_style: sans-serif
        body_style: sans-serif
        print_header_style: slab-serif
        print_body_style: serif
{
    "params": {
        "fonts": {
            "header_style": "sans-serif",
            "body_style": "sans-serif",
            "print_header_style": "slab-serif",
            "print_body_style": "serif"
        }
    }
}

The above code block shows the default values of each of the four configuration properties and how they would appear inside on a configuration file written in TOML. Properties prefixed with print_ affect printed pages only, while those without affect only the page on a screen. The header_style properties set the font family for all page headers, while the body_style ones affect the main text of the page (inside the <article> tag, for the web developers).

If header_style and body_style (or print_header_style and print_body_style) match, the choice of “serif” or “sans-serif” is applied to the entire page. If they do not match, text in the footer and sidebar is ignored, unless it is a header.

Enabling All Weights

To save on bandwidth, BluestNight includes CSS declarations for only regular, bold, italic, and bolditalic variations of the included fonts. The fonts themselves may come with further weights, such as light, medium, semibold, and black. Since these extra weights aren’t used when styling using markdown, they have been disabled. To reenable them, set params.extra_font_weights to true in your site configuration file.

Only enable the extra font weights if you plan on explicitly using them! The font files themselves should not be downloaded either way, but enabling unused fonts increases the length of the CSS stylesheet.