2021-07-18 10:34:01 +02:00
# Minima
2022-01-30 09:36:07 +01:00
A Hugo port of [Hexo Minima ](https://github.com/adisaktijrs/hexo-theme-minima ). [Demo site ](https://h.xjj.pub/ ).
2021-12-02 07:02:47 +01:00
2022-01-30 09:36:07 +01:00
> The main branch is in development stage, UI or configuration may vary. You can use the latest stable version [here](https://github.com/Mivinci/hugo-theme-minima/releases/tag/v1.1.0).
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
2022-01-26 15:45:45 +01:00
- [x] Clean
2021-11-12 09:30:39 +01:00
- [x] Light/dark mode
2022-01-26 15:45:45 +01:00
- [x] VSCode-style code hightlighting (the most alike among all Hugo themes)
2021-07-18 15:40:40 +02:00
- [x] KaTeX
2022-01-26 15:45:45 +01:00
- [x] Mermaid diagrams
2021-07-18 15:40:40 +02:00
- [x] Google analytics
2022-01-26 15:45:45 +01:00
- [x] Disqus/Utterances
- [x] Optional ToC
2022-01-30 09:36:07 +01:00
- [x] External link post
2021-07-18 10:34:01 +02:00
## Usage
2021-11-12 09:30:39 +01:00
Before using Minima, make sure you've got Hugo (extended version) installed on your device.
2021-07-18 15:40:40 +02:00
### 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 |
2022-01-26 16:20:50 +01:00
|:----------- |:------ |:------------------------------------------------------ |
| title | string | Title of the post |
| description | string | Description of the post |
| date | string | Datetime when the post is written |
2022-01-30 08:12:29 +01:00
| link | string | If set, the post will redirect to an external link |
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 |
2022-01-26 16:20:50 +01:00
| mermaid | bool | True if the post needs to render mermaid diagrams |
2021-07-18 15:40:40 +02:00
| comment | bool | True if the post allows people to make comments |
2022-01-26 16:20:50 +01:00
| draft | bool | True if the post isn't already for publishing |
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
2022-01-30 08:12:29 +01:00
### External Link Post
Use the `link` in the front matter to make a post a specific external link. Such external link post will redirect to the link provided.
**Example**
```yaml
---
author: XJJ
title: External Link Post
date: 2021-07-17T10:52:59+08:00
link: https://gohugo.io
---
```
And when you click the title in the list page, you will be redireted to https://gohugo.io which's 🆒.
2021-07-18 15:40:40 +02:00
### Feedback
Feedbacks are welcome [here ](https://github.com/Mivinci/hugo-theme-minima/issues ).