添加中文说明书

This commit is contained in:
Mivinci 2021-11-27 13:48:40 +08:00
parent 4ca99e2156
commit a06585b9ce
6 changed files with 89 additions and 13 deletions

View file

@ -7,8 +7,6 @@ math: true
comment: true
---
## Features
- [x] Light/dark mode
@ -48,7 +46,7 @@ Follow [exampleSite/config.toml](https://github.com/Mivinci/hugo-theme-minima/bl
### 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 |
@ -61,8 +59,6 @@ Follow [exampleSite/config.toml](https://github.com/Mivinci/hugo-theme-minima/bl
| 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).

View file

@ -8,6 +8,7 @@ categories: ["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.
<!--more-->
## Headings
@ -15,10 +16,15 @@ This article offers a sample of basic Markdown syntax that can be used in Hugo c
The following HTML `<h1>``<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest.
# H1
## H2
### H3
#### H4
##### H5
###### H6
## Paragraph
@ -47,15 +53,17 @@ The blockquote element represents content that is quoted from another source, op
Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
Name | Age
--------|------
| Name | Age |
| ---- | --- |
Bob | 27
Alice | 23
#### Inline Markdown within tables
| Italics | Bold | Code |
| -------- | -------- | ------ |
| --------- | -------- | ------ |
| *italics* | **bold** | `code` |
## Code Blocks
@ -89,8 +97,10 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
</html>
#### Code block with Hugo's internal highlight shortcode
{{< highlight html >}}
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
@ -109,7 +119,6 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
1. First item
2. Second item
3. Third item
- [x] checked
- [ ] not checked
@ -128,4 +137,3 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
* Dairy
* Milk
* Cheese

View file

@ -8,6 +8,7 @@ categories: ["Markdown", "KaTeX"]
---
Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries.
<!--more-->
In this example we will be using [KaTeX](https://katex.org/)
@ -29,7 +30,9 @@ In this example we will be using [KaTeX](https://katex.org/)
{{< math.inline >}}
{{ if or .Page.Params.math .Site.Params.math }}
<!-- KaTeX -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
@ -39,6 +42,7 @@ In this example we will be using [KaTeX](https://katex.org/)
### Examples
{{< math.inline >}}
<p>
Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)
</p>

View file

@ -37,7 +37,9 @@ Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli Leleg
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 >}}