LofiCode is a cozy, lo-fi inspired Hugo theme for developers and creatives who want a warm, retro-aesthetic blog with modern functionality such as an ambient sound player and dark/light modes.
What is LofiCode Hugo Theme?
LofiCode Hugo Theme is a static site theme built on Hugo, created by @madebydia. It accepts standard Hugo content files (posts, about, contact pages) and configuration in hugo.toml, and outputs a responsive blog with a lo-fi aesthetic, ambient sound player, dark/light mode toggle, and live search. It requires Hugo Extended v0.112.0 or later.
Key Features
LofiCode comes with a focused set of features that make a blog feel warm and live: an ambient sound player, automatic dark mode, live search, auto-generated table of contents, syntax highlighting, coffee-themed reading time, SPA navigation, and WCAG-compliant accessibility.
- Ambient Sounds — Built-in player with coffee shop, rain, and fireplace sounds, toggled and volume-adjusted from a bottom control bar.
- Dark/Light Mode — Automatic theme detection based on system preference with a manual toggle.
- Live Search — Real-time search across all posts without requiring extra services.
- Table of Contents — Auto-generated TOC for blog posts.
- Syntax Highlighting — Code blocks with copy functionality.
- Coffee Theme — Reading time displayed with coffee cups (e.g., "3 min read ☕☕").
- SPA Navigation — Smooth single-page-app experience for transitions.
- Accessibility — WCAG compliant with ARIA labels.
- Social Links — Icons for GitHub, Twitter, LinkedIn, Email, Mastodon, YouTube, Instagram, and Facebook, configured in hugo.toml.
Who is it for?
LofiCode is aimed at anyone who wants a personal or portfolio blog with a retro, cozy aesthetic — especially developers and creatives.
- Developers who want a personal blog with a distinctive retro aesthetic and code-friendly features like syntax highlighting and TOC.
- Creatives and artists who want a portfolio-style blog with about and contact pages that still looks cozy and inviting.
- Writers and bloggers who want a distracting-free reading experience with ambient background sounds and dark mode.
- Music and lo-fi fans who want to build a fan blog or playlist companion with the coffee shop/rain/fireplace soundscapes.
What can you do with LofiCode?
With LofiCode you can turn a standard Hugo content folder into several distinct kinds of sites.
- Start a personal blog: Create posts with Hugo's content structure, add tags and featured posts, and publish a fast, SEO-optimized static site.
- Build a portfolio: Use the included about and contact pages, profile section with photo and tagline, and social icons to showcase your work.
- Create a cozy community hub: Combine coffee-break shortcodes, mood badges, and featured posts to make a warm, personal site for your audience.
How does LofiCode work?
Install by cloning the repository into your Hugo site's themes directory or adding it as a git submodule. Set the theme in hugo.toml, configure author/profile/social parameters, create content with the hugo new command, and run hugo server -D for local development. The theme's styling is customized via CSS custom properties like --accent-primary.
Pros and cons
Most users will find LofiCode easy to adopt thanks to its light JavaScript footprint and MIT license, but it does require a recent Hugo Extended version.
- Pros: Released under the MIT License; no heavy JavaScript frameworks (efficient JS, lazy-loaded images); mobile-first responsive design; standards-compliant accessibility; optimized for speed and SEO.
- Cons: Requires Hugo Extended v0.112.0 or later; only three ambient sound presets are bundled (coffee shop, rain, fireplace).
FAQ
LofiCode is free, requires Hugo Extended, and comes with three ambient sounds — read on for the details.
Is LofiCode Hugo Theme free?
Yes. LofiCode is released under the MIT License, so you can use, modify, and redistribute it freely for personal or commercial projects. The repository has 22 stars on GitHub, indicating community interest.
What Hugo version is required?
You need Hugo Extended v0.112.0 or later. The theme uses features that are only available in the extended version of Hugo, which includes Sass/SCSS support and other advanced features.
Does LofiCode support dark mode?
Yes, the theme includes automatic theme detection that follows your system preference, plus a manual toggle so readers can switch between dark and light modes at any time.
What ambient sounds are included?
Three ambient loops are bundled: a soft rain sound, a crackling fireplace, and a coffee shop café ambience. Each is provided under Creative Commons licenses from Freesound, and can be toggled on/off with volume control.
Can I customize the theme colors?
Absolutely. The theme uses CSS custom properties (like --accent-primary, --accent-secondary, and --accent-tertiary) that you can override in your own stylesheet to change the accent palette to match your brand.





