blob: 578bccc776049c5c74d64f4cb4198209d8c8bc24 (
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
|
# Minimal
Personal blog theme powered by [Hugo](https://gohugo.io).
A live demo is available [here](https://themes.gohugo.io/theme/minimal/).
## Installation
You can install the theme either as a clone or submodule.
I recommend the latter. From the root of your Hugo site, type the following:
```
$ git submodule add https://github.com/calintat/minimal.git themes/minimal
$ git submodule init
$ git submodule update
```
Now you can get updates to Minimal in the future by updating the submodule:
```
$ git submodule update --remote themes/minimal
```
## Configuration
After installation, take a look at the `exampleSite` folder inside `themes/minimal`.
To get started, copy the `config.toml` file inside `exampleSite` to the root of your Hugo site:
```
$ cp themes/minimal/exampleSite/config.toml .
```
Now edit this file and add your own information. Note that some fields can be omitted.
I recommend you use the theme's archetypes so now delete your site's `archetypes/default.md`.
## Features
You can tweak the look of the theme to suit your needs in a number of ways:
- The accent colour can be changed by using the `accent` field in `config.toml`.
- You can also change the background colour by using `backgroundColor`.
- Add colored 5px borders at the top and bottom of pages by setting `showBorder` to `true`.
For best results, I recommend you use a dark accent colour with a light background, for example:
```toml
[params]
accent = "red"
showBorder = true
backgroundColor = "white"
```
### Fonts
The theme uses [Google Fonts](https://fonts.google.com) to load its font. To change the font:
```toml
[params]
font = "Raleway" # should match the name on Google Fonts!
```
### Syntax highlighting
The theme supports syntax highlighting thanks to [highlight.js](https://highlightjs.org).
It's disabled by default, so you have to enable it by setting `highlight` to `true` in your config.
You can change the style used for the highlighting by using the `highlightStyle` field.
Only the "common" languages will be loaded by default. To load more, use `highlightLanguages`.
A list of all the available styles and languages can be found [here](https://highlightjs.org/static/demo/).
Please note the style and languages should be written in hyphen-separated lowercase, for example:
```toml
[params]
highlight = true
highlightStyle = "solarized-dark"
highlightLanguages = ["go", "haskell", "kotlin", "scala", "swift"]
```
|