Dark and light theme support, by default automatically switching via CSS media queries
hugo-theme-flat — Hugo Starter Template
By leafee98
hugo-theme-flat is a Hugo theme imitating the WordPress theme Allium, supporting dark/light mode switching, multiple sections, and responsive layout, under the MIT license.
Explore the design
Compare the page layouts and mobile experience. Open any screenshot for a closer look.
Actual screenshot captured by the server browser.
All pages & views 3
Screenshots show visual appearance; interactive behavior may differ.
What stands out
A quick read of the recorded project description.
Can specify the default theme in configuration and enable a user-side theme toggle button
Responsive layout, adapting to desktop and mobile
Supports Hugo multiple sections, with sidebar cards displaying recent updates
Supports submenus
MIT license, allowing free use, modification, commercial use, and distribution
Template Details
hugo-theme-flat is developed by leafee98, a theme rewritten in Hugo, with its design referencing the WordPress theme Allium. The author states in the README that this is a theme for personal use and references the project structure of the Hugo themes jane and mini.
The theme provides dark and light theme support, by default automatically switching via CSS media queries. You can also set themeMode to auto, dark, or light in the configuration file to specify the default theme, and control whether to display a user-side toggle button via themeToggle. The layout is responsive and supports multi-section content organization: the bottom RSS and sidebar Recent card can display content from each section. Menu links need to be manually pointed to the corresponding targets in config.toml, and section ordering is achieved by setting weight in the front matter of _index.md in the corresponding directory.
In terms of limitations, the README clearly states that taxonomy separation by section has not yet been implemented. If articles from different sections share the same tag, the tag index page will mix and list articles from all sections, so it is recommended to use taxonomy only within a single section. The theme is under the MIT license, allowing free use, modification, commercial use, and distribution, but third-party assets such as demo images, fonts, and icons need to be checked separately for their licenses.
Is it right for your project?
Use Cases
- Applying a flat style appearance similar to WordPress Allium to a Hugo site
- Blogs that need automatic dark/light theme switching or a manual toggle button
- Organizing content by multiple sections and wanting to display recent updates in the sidebar
- Personal sites or documentation-type sites that need submenu navigation
Suitable For
- Users building personal blogs or small content sites with Hugo
- Users who prefer a flat, clean visual style and want an appearance close to Allium
- Site authors who need dark/light themes and responsive layout
- Users who accept manually configuring menus and section ordering in config.toml
Getting started & customization
Use these recorded setup notes alongside the repository instructions for your chosen version.
- 1
Set themeMode (auto/dark/light) and themeToggle (true/false) in [params] of config.toml to control the theme mode and toggle button
- 2
When using multiple sections, configure menu links in config.toml to point to the corresponding targets
- 3
To adjust section order, set weight in the front matter of _index.md in the corresponding directory
- 4
Taxonomy is not yet separated by section; it is recommended to use tags and other classifications only within a single section
- 5
Third-party assets such as demo images, fonts, and icons need to be checked separately according to their respective licenses
License & source material
Usage conditions & limitations
Free to use · keep license noticeThis entry covers the free version under the MIT license in the public repository; the free scope is the code of this version and does not mean external services or third-party assets are free.
Must comply with when using
- Free use, modification, commercial use, and distribution of this version's code are allowed.
- When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
- The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.
Additional costs & items to verify
- Taxonomy separation by section has not yet been implemented: if articles from different sections share the same tag, the tag index page will mix and list articles from all sections, so it is recommended to use taxonomy only within a single section.
- When using multiple sections, you need to configure menu links in config.toml to point to the correct targets yourself; the theme will not generate them automatically.
- To adjust section order, you need to manually set weight in the front matter of _index.md in the corresponding directory.
- Demo images, fonts, icons, and other third-party assets need to be checked according to their respective licenses; they cannot be judged solely by the code's MIT license.
- External services such as domain names, hosting, databases, payments, or AI may incur additional charges.
View Original Text Basis
Permission is hereby granted, free of charge
Original License Text
separating taxonomies according to different sections is not implemented yet. So better to only use taxonomies inside a specific section.
Original README
you will need to set up your menu at `config.toml` to point the hyperlink to proper destination.
Original README
https://github.com/leafee98/hugo-theme-flat/blob/main/LICENSEhttps://github.com/leafee98/hugo-theme-flat/blob/main/README.mdyou need a `_index.md` at the directory of the section to set proper weight at front matter
Original README
Compiled by DeepSeek based on repository license and README ·2026-10-03. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.
Project checks & description sources
Template Information
- Source platforms
- Hugo Themes
- Documentation and maintenance reference score
- More documented · 92 / 100
- Technologies
- Hugo · WordPress
- Website type
- Starter
How this score is calculated
Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.
What to verify for this project
- Repository update recorded
- 2026-02-12
- Screenshot last checked
- 2026-10-03
A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.
The catalog identifies Hugo as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.
Use a selection guide →How this description was prepared
AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.
Review declaration: [email protected] · 2026-10-04
Inspect the recorded source material
SHA-256: 3955db6758f49ef2217da989e18ab9ce82ce0a2a60b20aa195677762f9ade987
2026-10-03T18:48:10.228Z
Source file / repository# hugo-theme-flat This is a theme I personally use. ## Features - Dark theme support (auto switch by css media query) - Muti-Section supports - Side card to display recent updated sections - Responsive layout - Sub-menu support ## Dark & Light Theme Support By default, dark or light theme will be set according to CSS media query. You can for default light or dark theme as well as add a user-side theme toggle button by adding the following parameters to your config file. ```toml [params] themeMode = "auto" # sets default theme, options are "auto", "dark", or "light" themeToggle = false # sets presence of theme toggle, options are "true" or "false" ``` ## Multi Section Supports If you use multi sections (with the concept from hugo), the RSS at bottom and *Recent* at side are ready for displaying those content. However, you will need to set up your menu at `config.toml` to point the hyperlink to proper destination. If you want to re-order those sections, you need a `_index.md` at the directory of the section to set proper weight at front matter, just alike what was done at the exampleSite, see `/exampleSite/content/essays/_index.md`. See the predefined variable `weight` at [docs](https://gohugo.io/content-management/front-matter/#front-matter-variables). **Note** that separating taxonomies according to different sections is not implemented yet. So better to only use taxonomies inside a specific section. For a better understand, if you have to posts *A* and *B* in section *S1* and *S2*, both of the posts has the same tag *T1*, like the follow. ``` post A: section S1, tag T1, tag T2 post B: section S2, tag T2 ``` When you open the index page of *T1*, there will be two posts, rathor than post *A* when you are in section *S1* and post *B* when you are in section *S2*. ``` tag T1: post A, post B tag T2: post A ``` ## Special Thanks The wordpress theme [Allium](https://wordpress.org/themes/allium/), and [here](https://templatelens.com/allium/) is its home page. I like this theme very much when I'm using wordpress, but I don't have it on hugo, so I try my best to write a theme similar with it. There are many designs in this theme refers to it. The hugo theme [jane](https://github.com/xianmin/hugo-theme-jane) and [mini](https://github.com/nodejh/hugo-theme-mini/), this is my first time to write a hugo theme, I referred this two themes' project structure and way of handling problems.
Explore similar templates
Compare previews and descriptions within the same stack and category.

hugo-xmin
hugo-xmin is an extremely minimal Hugo theme written by Yihui Xie for template beginners. HTML and CSS total about 140 lines, with no external dependencies, and it uses the MIT license.
Hugo · Starter

hugo-theme-gallery
A Hugo Extended photo gallery theme that organizes images with Page Bundles, automatically generating album lists and gallery pages with a Justified layout and PhotoSwipe lightbox.
Hugo · Starter

reveal-hugo
reveal-hugo is a Hugo theme that converts Markdown content into Reveal.js-based HTML presentations. It supports slide separation with `---`, shortcodes for fragments, slides, sections, notes, Markdown, and MathJax, and organizes content as root or section presentations with order controlled by weight.
Hugo · Starter

anatole
Anatole is a minimalistic two-column Hugo theme ported from farbox-theme-Anatole, featuring dark mode, multilingual and RTL support, and optional portfolio, comments, analytics, KaTeX, and Mermaid integrations. It suits personal blogs, portfolios, or documentation sites built with Hugo.
Hugo · Starter

hugo-theme-diary
A Hugo diary-style theme ported from the Hexo theme Journal, with a grid homepage for essays and daily notes. It supports six languages, dark mode, table-of-contents scroll positioning, reading time, code highlighting, and configurable sidebar, fonts, and colors.
Hugo · Starter

risotto
risotto is a minimalist, responsive Hugo theme inspired by terminal ricing aesthetics. It uses semantic HTML and pure CSS with no JavaScript, and its layout relies on CSS Grid for native responsiveness without manual breakpoints.
Hugo · Starter
