docs: update docs

This commit is contained in:
st1020 2024-01-12 21:49:15 +08:00
parent d7d6e69130
commit 43911ffe82
8 changed files with 315 additions and 140 deletions

View file

@ -1,15 +1,14 @@
+++
title = "Markdown Syntax Guide"
date = "2019-03-11"
date = "2022-10-20"
description = "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
[taxonomies]
tags = ["markdown", "css", "html"]
[extra]
mermaid = true
cover_image = "images/markdown-content.png"
+++
This article offers a sample of basic Markdown syntax that can be used in Zola content files, also it shows whether basic HTML elements are decorated with CSS in a Zola theme.
This article offers a sample of basic Markdown syntax that can be used in Zola content files, also it shows whether basic HTML elements are decorated with CSS in a Kita theme.
<!--more-->
@ -131,57 +130,3 @@ X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
Press <kbd><kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd></kbd> to end the session.
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
## Mermaid
{% mermaid() %}
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
{% end %}
{% mermaid() %}
```
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts <br/>prevail!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
```
{% end %}
{% mermaid() %}
```mermaid
gitGraph
commit
commit
branch develop
commit
commit
commit
checkout main
commit
commit
```
{% end %}
## Admonition
{% admonition(type="tip", title="Tip") %}
This is a tip.
{% end %}

View file

@ -1,6 +1,6 @@
+++
title = "Math Typesetting"
date = "2019-03-08"
date = "2022-10-20"
description = "A brief guide to setup KaTeX"
extra.math = true
+++
@ -9,18 +9,28 @@ Kita theme support $\LaTeX$ mathematical formulas using [KaTeX](https://katex.or
<!--more-->
- To enable KaTeX globally set the parameter `extra.math` to `true` in a project's configuration
- To enable KaTeX on a per page basis include the parameter `extra.math = true` in content files
- To enable KaTeX globally, set the parameter `extra.math` to `true` in a project's configuration.
- To enable KaTeX on a per page basis, include the parameter `extra.math = true` in the frontmatter of content files.
**Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html)
**Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html).
### Examples
<p>
Inline math: $(varphi = dfrac{1+sqrt5}{2}= 1.6180339887…)$
</p>
#### Inline math
Block math:
```markdown
When $x = \pi$, Euler's formula may be rewritten as $e^{i \pi} + 1 = 0$.
```
When $x = \pi$, Euler's formula may be rewritten as $e^{i \pi} + 1 = 0$.
#### Block math
```markdown
$$
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
$$
```
$$
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }

View file

@ -1,36 +0,0 @@
+++
title = "Placeholder Text 6"
date = "2023-10-20"
description = "Lorem Ipsum Dolor Si Amet"
[taxonomies]
tags = ["markdown", "text"]
+++
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**.

View file

@ -1,36 +0,0 @@
+++
title = "Placeholder Text"
date = "2019-03-09"
description = "Lorem Ipsum Dolor Si Amet"
[taxonomies]
tags = ["markdown", "text"]
+++
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**.

158
content/shortcodes.md Normal file
View file

@ -0,0 +1,158 @@
+++
title = "Shortcodes"
date = "2022-10-20"
description = "The Kita theme shortcodes."
[taxonomies]
tags = ["markdown", "css", "html"]
[extra]
mermaid = true
+++
The Kita theme providers multiple shortcodes.
Never heard of shortcodes? See [Zola documentation](https://www.getzola.org/documentation/content/shortcodes/) for more information.
## Mermaid
To use Mermaid in your page, you have to set `extra.mermaid = true` in the frontmatter of page.
```markdown
+++
title = "Your page title"
[extra]
mermaid = true
+++
```
Then you can use the `mermaid()` shortcodes like:
```markdown
{%/* mermaid() */%}
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
{%/* end */%}
```
This will be rendered as:
{% mermaid() %}
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
{% end %}
In addition, you can use code block inside `mermaid()` shortcodes and the code block will be ignored.
The code block prevents formatter from breaking mermaid's formatting.
````markdown
{%/* mermaid() */%}
```mermaid
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts <br/>prevail!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
```
{%/* end */%}
````
This will be rendered as:
{% mermaid() %}
```mermaid
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts <br/>prevail!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
```
{% end %}
## Admonition
The `admonition()` shortcode displays a banner to help you put notice in your page.
You can use the `admonition()` shortcode like:
```markdown
{%/* admonition(type="tip", title="tip") */%}
The `tip` admonition.
{%/* end */%}
```
The admonition shortcode has 12 different types:
{% admonition(type="note", title="note") %}
The `note` admonition.
{% end %}
{% admonition(type="abstract", title="abstract") %}
The `abstract` admonition.
{% end %}
{% admonition(type="info", title="info") %}
The `info` admonition.
{% end %}
{% admonition(type="tip", title="tip") %}
The `tip` admonition.
{% end %}
{% admonition(type="success", title="success") %}
The `success` admonition.
{% end %}
{% admonition(type="question", title="question") %}
The `question` admonition.
{% end %}
{% admonition(type="warning", title="warning") %}
The `warning` admonition.
{% end %}
{% admonition(type="failure", title="failure") %}
The `failure` admonition.
{% end %}
{% admonition(type="abstract", title="danger") %}
The `danger` admonition.
{% end %}
{% admonition(type="bug", title="bug") %}
The `bug` admonition.
{% end %}
{% admonition(type="example", title="example") %}
The `example` admonition.
{% end %}
{% admonition(type="quote", title="quote") %}
The `quote` admonition.
{% end %}

100
content/theme-config.md Normal file
View file

@ -0,0 +1,100 @@
+++
title = "Theme Config Guide"
date = "2022-10-20"
description = "The config fo Kita theme."
[taxonomies]
tags = ["theme", "markdown"]
+++
You can customize Kita theme by editing `config.toml`.
Here are all the kita theme options:
```toml
# The Kita theme style config.
[extra]
# Enable KaTex math formula support globally.
math = false
# Enable mermaid support globally.
mermaid = false
# Enable comment support globally.
comment = false
# Disable the post navigation.
disable_post_navigation = false
[extra.style]
# The custom background color.
# bg_color = ""
# The custom background color in dark mode.
# bg_dark_color = ""
# Enable header blur.
# header_blur = true
# The custom header color, only available when `header_blur` is false.
# header_color = ""
# The custom header color in dark mode, only available when `header_blur` is false.
# header_dark_color = ""
# The profile on home page.
[extra.profile]
name = "Kita - Zola Theme"
bio = "Kita is a clean, elegant and simple blog theme for Zola."
# The URL of avatar.
avatar_url = "icons/github.svg"
# Invert color in dark mode.
avatar_invert = true
# The social icons below the profile on the home page.
[[extra.profile.social]]
name = "github"
url = "https://github.com/st1020/kita"
[[extra.profile.social]]
name = "twitter"
url = "https://github.com/st1020/kita"
[[extra.profile.social]]
name = "rss"
url = "$BASE_URL/atom.xml"
# The top menu.
[[extra.menu]]
name = "Projects"
url = "$BASE_URL/projects"
[[extra.menu]]
name = "Archive"
url = "$BASE_URL/archive"
[[extra.menu]]
name = "Tags"
url = "$BASE_URL/tags"
[[extra.menu]]
name = "About"
url = "$BASE_URL/about"
# The page footer options.
[extra.footer]
since = 2020
license = "CC BY-SA 4.0"
license_url = "https://creativecommons.org/licenses/by-sa/4.0/deed"
# The giscus comment options, only available when comment is enabled.
[extra.giscus]
repo = ""
repo_id = ""
category = ""
category_id = ""
mapping = "pathname"
strict = 1
reactions_enabled = 0
emit_metadata = 0
input_position = "top"
theme = "light"
lang = "en"
loading = "lazy"
```