Onze · A minimal Eleventy blog template

Themes and Dark Mode

Onze includes color themes inherited from Lanyon and automatic dark mode support.

Color Themes

To change the color theme, set the theme field in _data/site.json:

{
  "theme": "theme-base-08"
}

This applies the theme class to the <body> element, changing the sidebar and link colors.

Available themes

Class Color
(empty) Default (dark sidebar)
theme-base-08 Red
theme-base-09 Orange
theme-base-0a Yellow
theme-base-0b Green
theme-base-0c Cyan
theme-base-0d Blue
theme-base-0e Magenta
theme-base-0f Brown

Leave the theme field empty for the default dark sidebar.

Dark Mode

Dark mode is enabled by default and activates automatically based on the user's system preference (prefers-color-scheme: dark).

To disable dark mode, set darkMode to false in _data/site.json:

{
  "darkMode": false
}

Dark mode applies to all elements: body, sidebar, headings, links, code blocks, pagination, and related posts.