aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: 99a3b2446e2cd8f3df00c56372e0a84762da853f (plain) (blame)
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# no style, please!

A (nearly) no-CSS, fast, minimalist [Zola](https://www.getzola.org/) theme.
Ported from from [riggraz](https://riggraz.dev/)'s [no style, please! Jekyll theme](https://riggraz.dev/no-style-please/), and I use it for [my site](https://4b.cx/)

![screenshot](./screenshot.png)

## Installation

First download this theme to your `themes` directory:

```bash
cd themes
git clone https://gitlab.com/4bcx/no-style-please.git
```

and then enable it in your `config.toml`:

```toml
theme = "no-style-please"
```

## Options

### Default taxonomies

Special templates for `tags`, `categories`, and `contexts` taxonomies are provided. However, generic templates exist for custom taxonomies.

To use taxonomies, in a page metadata add

```toml
[taxonomies]
tags = [ 'tag1', 'tag2' ]
categories = [ 'category A', 'B class' ]
genre = [ 'rock', 'alternative' ]   # custom taxonomy
```

### Pages list in homepage

To enable listing of pages in homepage add the following in `config.toml`

```toml
[extra]
list_pages = true
```

### Header and footer nav links

Also in the `extra` section in `config.toml`

```toml
[extra]

header_nav = [
    { name = "~home", url = "/" },
    { name = "#tags", url = "/tags" },
    { name = "+categories", url = "/categories" },
    { name = "@contexts", url = "/contexts" },
    { name = "example", url = "http://example.com", new_tab=true },
]
footer_nav = [
    { name = "< previous", url = "#" },
    { name = "webring", url = "#" },
    { name = "next >", url = "#" },
]
```

### Add TOC to pages

In a page frontmatter, set `extra.add_toc` to `true`

```toml
[extra]
add_toc = true
```

### Extra data

- `author` can be set in both main config and in pages metadata
- `image` variable can be used in pages to add an image to HTML `<meta>` tags
- Same for `logo` in main config, except this one is also used as the site icon

### Horizontal rule shortcode `hr()`

Adds the option to insert text in the thematic break

```html
{{ hr(data_content="footnotes") }}
```

is rendered

![thematic break screenshot](./hr_footnotes.png)

### Invertable image `iimg()`

Images are not inverted in darkmode by default. To add an invertable image use the following

```html
{{ iimg(src="logo.png", alt="alt text") }}
```

In light mode

![image in light mode](./iimg_light.png)

In dark mode

![image in dark mode](./iimg_dark.png)

## TODO

- [ ] Add RTL support
- [ ] Write proper test pages

## License

The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).