A hugo theme made in imitation of the wordpress theme Allium https://leafee98.github.io/hugo-theme-flat/
Find a file
2026-02-13 02:39:13 +08:00
.github/workflows Update github-CI to latest hugo template 2025-05-11 23:36:55 +08:00
archetypes added new parameters to default archetype 2026-01-29 14:24:33 +02:00
exampleSite enable dark/light toggle by default 2026-02-13 02:39:13 +08:00
images update images 2023-05-28 22:30:32 +08:00
layouts Merge branch 'main' into feature/theme-config-options 2026-02-08 23:12:35 +08:00
static Auto theme is possile when themeToggle set to true 2026-02-13 02:39:13 +08:00
.gitignore add gitignore 2022-04-27 21:53:20 +08:00
LICENSE add license, theme.toml 2022-09-04 19:45:50 +08:00
README.md add ability to force default theme and add theme toggle button 2026-01-29 11:23:24 +02:00
theme.toml update README and theme.toml 2023-03-17 21:06:40 +08:00

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.

[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.

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, and here 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 and mini, this is my first time to write a hugo theme, I referred this two themes' project structure and way of handling problems.