Welcome to mirror list, hosted at ThFree Co, Russian Federation.

README.md - github.com/cntrump/hugo-notepadium.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 95d56b08d794d9df71a73840b15ddacfb942988f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# hugo-notepadium ![](https://img.shields.io/badge/license-MIT-blue.svg) [![Netlify Status](https://api.netlify.com/api/v1/badges/2f389751-e070-437b-9dbd-3773bd57322e/deploy-status)](https://lvv.me)

a fast [gohugo](https://gohugo.io) theme, **100% JavaScript-free**.

- built-in `syntanx highlight`
- `MathJax` support
- custom `404 page`

![](https://lvv.me/posts/2019-11-24_a_simple_hugo_theme/01.png)

the core CSS is `core.css`, transferred size < 3KB.

preview this theme: https://lvv.me

## Quick Start

```shell
git submodule add https://github.com/cntrump/hugo-notepadium.git themes/hugo-notepadium
```

demo `config.toml`:

```toml
baseURL = "/"
languageCode = "zh-cn"
title = "Lvv's notepad"
theme = "hugo-notepadium"
copyright = "Copyright ©2019 lvv. All rights reserved."
hasCJKLanguage = true
enableRobotsTXT = true
paginate = 10
summaryLength = 140

# Hugo v0.60+ new configuration
[markup.highlight]
codeFences = true
noClasses = false

# old Hugo version
pygmentsUseClasses = true
pygmentsCodeFences = true
pygmentsCodeFencesGuessSyntax = true
```

If you like syntax highlight with JS, both `hljs` and `prismjs` are builtin:

```toml

# Disable Hugo bultin syntax highlight

# Hugo v0.60+ new configuration
[markup.highlight]
codeFences = false
noClasses = false

# old Hugo version
# pygmentsUseClasses = true
# pygmentsCodeFences = true
# pygmentsCodeFencesGuessSyntax = true

# enable JS highlight
[params.syntax]
use = "hljs"  # 1. prismjs 2. hljs 3. none
```

enable `MathJax` support

```toml
[params.MathJax]
enable = true
```

Usage

```
When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
```

You can custom nav items:

```toml
[params.nav]
showCategories = true       # /categories/
showTags = true             # /tags/
customs = ["album","about"]  # /album/; /about/
```

Set site slogan and logo

```toml
[params]
logo = "logo.png"
slogan = "code my life ~"
```