2021-07-18 10:34:01 +02:00
# Minima
2021-11-12 06:34:03 +01:00
A Clean and minimal Hugo theme porting from [Minima on Hexo ](https://github.com/adisaktijrs/hexo-theme-minima ). [Click me ](https://h.xjj.pub/ ) to take a look at the demo site.
2021-07-18 10:34:01 +02:00
2021-07-18 15:40:40 +02:00
![screenshot ](./images/tn.png )
2021-07-18 10:34:01 +02:00
## Features
- [x] light/dark mode
2021-07-18 15:40:40 +02:00
- [x] Code Hightlight
- [x] KaTeX
2021-08-19 06:42:47 +02:00
- [x] Mermaid
2021-07-18 15:40:40 +02:00
- [x] Google analytics
- [x] Disqus/OvO comments
2021-08-04 03:49:55 +02:00
- [x] Optional ToC
2021-07-18 10:34:01 +02:00
## Usage
2021-07-18 15:40:40 +02:00
Before using Minima, make sure you've got Hugo(v0.41.0 or higher) installed on your device.
### Installation
Suppose `blog` is where you place your sources.
```bash
cd blog
git init
git submodule add --depth 1 https://github.com/mivinci/hugo-theme-minima.git themes/minima
```
Or `clone` directly if you don't wanna use the Git submodule.
```bash
git clone https://github.com/mivinci/hugo-theme-minima.git themes/minima
```
Anyways, you just need to put Minima under the `blog/themes` directory.
### Configuration
Follow [exampleSite/config.toml ](https://github.com/Mivinci/hugo-theme-minima/blob/main/exampleSite/config.toml ) and edit your own `blog/config.toml` file.
### Supported Front Matters
| Field | Type | Explanation |
| ----------- | ------ | ------------------------------------------------------ |
| title | string | Title of the post, will be rendered in a `h1` tag |
| description | string | Description of the post, will be rendered in a `p` tag |
| date | string | Datetime that the post is written |
2021-08-19 06:42:47 +02:00
| categories | array | Array of categories the posts belongs to |
| series | array | Array of series the post belongs to |
| tags | array | Array of tags the posts is related to |
2021-07-18 15:40:40 +02:00
| math | bool | True if the post needs to render math formulas |
2021-08-19 06:42:47 +02:00
| mermaid | bool | True if the post needs to render mermaid graphs |
2021-07-18 15:40:40 +02:00
| comment | bool | True if the post allows people to make comments |
| draft | bool | True if the post isn't already to production |
2021-08-04 03:49:55 +02:00
| toc | bool | True if the post needs a ToC |
2021-08-19 06:42:47 +02:00
2021-07-18 15:40:40 +02:00
2021-08-04 03:49:55 +02:00
2021-07-18 15:40:40 +02:00
### Feedback
Feedbacks are welcome [here ](https://github.com/Mivinci/hugo-theme-minima/issues ).
2021-07-18 10:34:01 +02:00