Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A high contrast, text oriented, performant and Javascript-free theme for Hugo.
Black & Light is a high-contrast, text-oriented, JavaScript-free theme for the Hugo static site generator, engineered to load in a single request and earn a perfect Google Page Speed score.
Black & Light is a theme for Hugo, the popular Go-based static site generator. It takes Markdown content and renders it into a static website with a strict black-and-white, high-contrast design. The theme is built without JavaScript, inlines all styles in the head, and is designed to load everything in one HTTP request when web-fonts are disabled. It is created by David Hamp-Gonsalves and released under the GPL 3.0 license.
prefers-color-scheme media query, automatically switching to a dark color scheme.Black & Light is ideal for developers and writers who want a distraction-free reading experience. It suits personal blogs, documentation sites, and text-heavy portfolios where content is the center of attention. The theme is also a strong choice for performance-conscious site owners who prioritize Page Speed scores and minimal resource usage.
Installation is straightforward: inside your Hugo project folder, run git submodule add https://github.com/davidhampgonsalves/hugo-black-and-light-theme.git themes/black-and-light. Then copy the exampleSite's config.toml from the repository to your site root, or use it as a reference. The theme then processes your Markdown content through Hugo and outputs a static site.
Black & Light is free and open source, released under the GPL 3.0 license. Anyone can use, modify, and redistribute the theme, provided derivative works share the same license.
Yes. The theme is fully open source under the GPL 3.0 license, so you can use it for personal or commercial projects without charge.
No, the theme is scriptless by default. It only includes Google Analytics JavaScript if you configure it in the site's configuration. This keeps the page free of client-side scripting.
Use Hugo's theme installation method: git submodule add https://github.com/davidhampgonsalves/hugo-black-and-light-theme.git themes/black-and-light in the root of your Hugo site, then copy the exampleSite config.toml file.
Yes. The theme includes a built-in dark color scheme that responds to the CSS prefers-color-scheme media query, so it automatically adapts to your visitor's system setting.
The theme reports a 100/100 score on Google Page Speed for both mobile and desktop when web-fonts are disabled. With web-fonts enabled, the score is still 100/100 on desktop.
