hugo-theme-minima/exampleSite/content/instruction.md

67 lines
2.5 KiB
Markdown
Raw Normal View History

2021-08-19 06:42:47 +02:00
---
author: Hugo Authors
title: Instruction
date: 2021-07-19T10:52:59+08:00
2022-01-25 17:37:56 +01:00
description: A Clean and minimal Hugo theme porting from the [Hexo Minima](https://github.com/adisaktijrs/hexo-theme-minima). [Click me](https://h.xjj.pub/) to take a look.
2021-08-19 06:42:47 +02:00
math: true
2021-11-12 08:47:28 +01:00
comment: true
2021-08-19 06:42:47 +02:00
---
2022-01-25 17:37:56 +01:00
> The main branch is in development stage, UI or configurations may vary. You can use the latest stable version [here](https://github.com/Mivinci/hugo-theme-minima/releases/tag/v1.0.0).
2021-08-19 06:42:47 +02:00
## Features
- [x] Light/dark mode
2021-11-12 09:30:39 +01:00
- [x] VSCode-style code hightlighting
2021-08-19 06:42:47 +02:00
- [x] KaTeX
- [x] Mermaid
- [x] Google analytics
2021-11-12 09:30:39 +01:00
- [x] Disqus/Utterances comments
2021-08-19 06:42:47 +02:00
- [x] Optional ToC
## Usage
2022-01-25 17:37:56 +01:00
Before using Minima, make sure you've got Hugo (extended version) installed on your device.
2021-08-19 06:42:47 +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-25 17:37:56 +01:00
| ----------- | ------ | ------------------------------------------------------ |
2021-08-19 06:42:47 +02:00
| 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 |
| 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 |
| math | bool | True if the post needs to render math formulas |
| mermaid | bool | True if the post needs to render mermaid graphs |
| comment | bool | True if the post allows people to make comments |
| draft | bool | True if the post isn't already to production |
| toc | bool | True if the post needs a ToC |
### Feedback
Feedbacks are welcome [here](https://github.com/Mivinci/hugo-theme-minima/issues).