pulec.foo git

zola-theme-plc-example

Example for Zola plc theme

content/05-markdown-config.md

Mode
-rw-r--r--
Size
3084 bytes
Reference
content/05-markdown-config.md@8ebfcee8b464 (last change)
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
+++
title = "Markdown configuration"
description = "Complete reference for Zola's [markdown] and [markdown.highlighting] settings in zola.toml."
date = 2026-03-14
[taxonomies]
tags = ["howto"]
+++

## Recommended settings

Add these to your `zola.toml` for a good default experience:

```toml
[markdown]
smart_punctuation = true    # "quotes" -> curly quotes, -- -> en-dash, --- -> em-dash
bottom_footnotes = true     # Footnotes render at the page bottom (GitHub-style)
lazy_async_image = true     # Adds loading="lazy" and decoding="async" to images
```

---

## Complete `[markdown]` reference

All options and their defaults:

| Option | Type | Default | Description |
|---|---|---|---|
| `render_emoji` | bool | `false` | Convert `:emoji:` codes to Unicode characters |
| `external_links_target_blank` | bool | `false` | Open external links in a new tab |
| `external_links_no_follow` | bool | `false` | Add `rel="nofollow"` to external links |
| `external_links_no_referrer` | bool | `false` | Add `rel="noreferrer"` to external links |
| `external_links_external` | bool | `true` | Add `rel="external"` to external links |
| `external_links_class` | string | `""` | CSS class added to external links |
| `smart_punctuation` | bool | `false` | Typographic quotes, en-dashes, em-dashes |
| `definition_list` | bool | `false` | Enable `term` / `: definition` syntax |
| `lazy_async_image` | bool | `false` | Add `loading="lazy"` and `decoding="async"` to `<img>` |
| `bottom_footnotes` | bool | `false` | Render footnotes at page bottom |
| `github_alerts` | bool | `false` | Enable `> [!NOTE]` / `> [!WARNING]` callout syntax |
| `insert_anchor_links` | string | `"none"` | Add anchor links to headers: `"left"`, `"right"`, `"heading"`, or `"none"` |

---

## Complete `[markdown.highlighting]` reference

| Option | Type | Default | Description |
|---|---|---|---|
| `theme` | string | `"base16-ocean-dark"` | Syntax highlight theme name |
| `style` | string | *(none)* | Choose `"class"` for CSS-based or omit for inline styles |
| `light_theme` | string | *(none)* | Separate theme for light mode (requires `style = "class"`) |
| `dark_theme` | string | *(none)* | Separate theme for dark mode (requires `style = "class"`) |
| `error_on_missing_language` | bool | `false` | Fail the build if a code block specifies an unknown language |
| `extra_grammars` | list | `[]` | Paths to additional `.sublime-syntax` grammar files |
| `extra_themes` | list | `[]` | Paths to additional `.tmTheme` theme files |

Browse available themes at [textmate-grammars-themes.netlify.app](https://textmate-grammars-themes.netlify.app/).

---

## Highlighting theme example

To switch themes, change the `theme` value:

```toml
[markdown.highlighting]
theme = "monokai"
```

For separate light/dark themes using CSS classes:

```toml
[markdown.highlighting]
style = "class"
light_theme = "OneHalfLight"
dark_theme = "OneHalfDark"
```

With `style = "class"`, Zola generates CSS class names instead of inline styles, and applies the appropriate theme based on the user's color scheme preference.