c3re-website/themes/hugo-theme-flat/README.md

40 lines
2.0 KiB
Markdown
Raw Normal View History

2023-12-13 22:55:13 +01: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
## Multi Section Supports
2024-01-18 14:27:25 +01:00
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.
2023-12-13 22:55:13 +01:00
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.
2024-01-18 14:27:25 +01:00
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.
2023-12-13 22:55:13 +01:00
```
post A: section S1, tag T1, tag T2
post B: section S2, tag T2
```
2024-01-18 14:27:25 +01:00
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_.
2023-12-13 22:55:13 +01:00
```
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.