breaking change in configuration

This commit is contained in:
Mivinci 2022-11-08 23:10:57 +08:00
parent f1b32bd47e
commit 0ca65fbca5
20 changed files with 373 additions and 361 deletions

View file

@ -1,70 +0,0 @@
---
author: Mivinci
title: Instruction
date: 2021-07-19T10:52:59+08: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.
tags:
- Hugo
- Minima
math: true
comment: true
---
> 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.1.0).
## Features
- [x] Clean
- [x] Light/dark mode
- [x] VSCode-style code hightlighting (the most alike among all Hugo themes)
- [x] KaTeX
- [x] Mermaid diagrams
- [x] Google analytics
- [x] Disqus/Utterances
- [x] Optional ToC
## Usage
Before using Minima, make sure you've got Hugo (extended version) 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 |
| description | string | Description of the post |
| date | string | Datetime when 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 diagrams |
| comment | bool | True if the post allows people to make comments |
| draft | bool | True if the post isn't already for publishing |
| toc | bool | True if the post needs a ToC |
### Feedback
Feedbacks are welcome [here](https://github.com/Mivinci/hugo-theme-minima/issues).

View file

@ -1,10 +0,0 @@
---
author: Hugo Authors
title: 使用说明
date: 2021-07-19T10:52:59+08:00
description:
math: true
comment: true
---
你好

View file

@ -1,7 +1,7 @@
---
author: XJJ
title: External Link Post
author: Mivinci
title: An External Link
date: 2021-07-17T10:52:59+08:00
description:
description: This is a link to an external resource.
link: https://gohugo.io
---

View file

@ -3,7 +3,8 @@ author: "Hugo Authors"
title: "Markdown Syntax Guide"
date: "2021-07-18T10:52:59+08:00"
description: "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
categories: ["Markdown"]
categories: ["markdown"]
tags: ["markdown"]
---
This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.

View file

@ -0,0 +1,176 @@
---
author: "Mivinci"
title: "Markdown 语法指北"
date: "2021-07-18T10:52:59+08:00"
description: "一篇 Markdown 示例文章,翻译自官方示例。"
categories: ["markdown"]
tags: ["markdown"]
---
本文提供了一个可以在 Hugo 内容文件中使用的基本 Markdown 语法示例,还展示了基本 HTML 元素是否在 Hugo 主题中使用 CSS 进行修饰。
<!--more-->
## 标题
下面的 HTML `<h1>``<h6>` 元素代表了六个级别的章节标题。 `<h1>` 是最高的部分级别,而 `<h6>` 是最低的。
# 一级标题
## 二级标题
### 三级标题
#### 四级标题
##### 五级标题
###### 六级标题
## 段落
Xerum我可以和他解释谁在痛苦中。 当我来到你身边,当我充满快乐时,我被快乐所折磨,或者他是天生的,或者是一个骗子,因为那个让我快乐痛苦的人是事情的专家,或者他撕裂和撕破自己的意志,仿佛他值得被遮盖,他是不是走到了心坎上,以同样的心去追随同样的事情? 为什么毛孔会竖起来,当它被放置在一个不知道老鼠意志或一切的地方时? 我会安静的。 就我而言,我的心以一种或另一种方式受到干扰,我把它们撕下来擦干,这样我要么杀了它们,要么让它们逃跑。 他憎恨真相,因为 veliamenim 的浪潮是起因和面子本身,而版本的痛苦又重演了。
是旅行吗? 因为每一件事都有一些你讨厌或讨厌的东西,所以你会吃东西,以免让你的智慧隐藏这样一个事实,即心脏和心脏或有趣的东西会从中出来。
## 块引用
blockquote 元素表示从另一个来源引用的内容可选地带有必须在“footer”或“cite”元素内的引用以及可选的内联更改例如注释和缩写。
#### 不注明出处的块引用
> 然后,为了铸币安德普,要给予的知识相应地减少。
> **注意**您可以在块引用中使用 *Markdown 语法*
#### 带出处的块引用
> 不要通过共享内存来通信,通过通信来共享内存。<br>
> — <cite>Rob Pike[^1]</cite>
[^1]: 上述引述摘自 Rob Pike 在 2015 年 11 月 18 日 Gopherfest 期间的 [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c)。
## 表格
表格不是核心 Markdown 规范的一部分,但 Hugo 支持开箱即用地支持它们。
| 姓名 | 年龄 |
|:----:|:---:|
| 小明 | 27 |
| 大壮 | 23 |
#### 表格内的内联 Markdown
| 斜体 | 粗体 | 代码 |
|:---------:|:--------:|:------:|
| *斜体* | **粗体** | `code` |
## 代码块
#### 带反引号的代码块
```html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
```
#### 缩进四个空格的代码块
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
#### Golang 的代码块
```go {hl_lines=[3]}
type Registry interface {
Register(*Service, ...RegisterOption) error
Deregister(*Service, ...DeregisterOption) error
GetService(string, ...GetOption) ([]*Service, error)
}
```
#### C艹 的代码块
```c++
#include <iostream>
class Animal {
string name;
public:
void eat();
}
void Animal::eat() {
std::cout << "eat something" << std::endl;
}
```
#### Jvav 的代码块
```java
class Animal {
void speak() { /* speak */ }
}
class Dog extends Animal {
@override
void speak() { /* bark */ }
}
class Cat extends Animal {
@override
void speak() { /* mew */ }
}
```
#### Python 的代码块
```python
class Dog(Animal):
def __init__(self):
super.__init__()
def eat():
pass
```
## 列表类型
#### 有序列表
1. 第一项
2. 第二项
3. 第三项
- [x] 已勾选
- [ ] 未勾选
#### 无序列表
* 第一项
* 另一项
* 另另一项
#### 嵌套列表
* 水果
* 苹果
* 橘子
* 香蕉
* 乳制品
* 牛奶
* 奶酪

View file

@ -2,7 +2,7 @@
author: Hugo Authors
title: Math Typesetting
date: 2021-07-18T10:52:59+08:00
description: A brief guide to setup KaTeX
description: A brief guide to setup KaTeX.
math: true
categories: ["Markdown", "KaTeX"]
---

View file

@ -2,7 +2,7 @@
author: Hugo Authors
title: Mermaid Graphs
date: 2021-07-18T10:52:59+08:00
description: A brief guide to setup Mermaid
description: A brief guide to setup Mermaid.
mermaid: true
draft: false
categories: ["Markdown", "Mermaid"]
@ -15,4 +15,4 @@ graph LR
Start --> Stop
{{</mermaid>}}
For more documentations on Mermaid, view [mermaid](https://mermaid-js.github.io/mermaid).
For more documentations on Mermaid, check out [mermaid](https://mermaid-js.github.io/mermaid).

View file

@ -1,45 +0,0 @@
+++
author = "Hugo Authors"
title = "Placeholder Text"
date = "2021-07-11T10:52:59+08:00"
description = "Lorem Ipsum Dolor Si Amet"
toc = true
categories = ["Markdown"]
+++
Lorem est tota propiore conpellat pectoribus de pectora summo. <!--more-->Redit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum.
1. Exierant elisi ambit vivere dedere
2. Duce pollice
3. Eris modo
4. Spargitque ferrea quos palude
Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus silentia flumen, sustinet placuit petis in dilapsa erat sunt. Atria tractus malis.
1. Comas hunc haec pietate fetum procerum dixit
2. Post torum vates letum Tiresia
3. Flumen querellas
4. Arcanaque montibus omnes
5. Quidem et
# Vagus elidunt
<svg class="canon" xmlns="http://www.w3.org/2000/svg" overflow="visible" viewBox="0 0 496 373" height="373" width="496"><g fill="none"><path stroke="#000" stroke-width=".75" d="M.599 372.348L495.263 1.206M.312.633l494.95 370.853M.312 372.633L247.643.92M248.502.92l246.76 370.566M330.828 123.869V1.134M330.396 1.134L165.104 124.515"></path><path stroke="#ED1C24" stroke-width=".75" d="M275.73 41.616h166.224v249.05H275.73zM54.478 41.616h166.225v249.052H54.478z"></path><path stroke="#000" stroke-width=".75" d="M.479.375h495v372h-495zM247.979.875v372"></path><ellipse cx="498.729" cy="177.625" rx=".75" ry="1.25"></ellipse><ellipse cx="247.229" cy="377.375" rx=".75" ry="1.25"></ellipse></g></svg>
[The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon)
## Mane refeci capiebant unda mulcebat
Victa caducifer, malo vulnere contra dicere aurato, ludit regale, voca! Retorsit colit est profanae esse virescere furit nec; iaculi matertera et visa est, viribus. Divesque creatis, tecta novat collumque vulnus est, parvas. **Faces illo pepulere** tempus adest. Tendit flamma, ab opes virum sustinet, sidus sequendo urbis.
Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae vulnus haerentia iuste et exercebat, sui et.
Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, *oculos nomen* non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem Propoetides **parte**.
{{< css.inline >}}
<style>
.canon { background: white; width: 100%; height: auto; }
</style>
{{< /css.inline >}}