pulec.foo git

zola-theme-plc-example

Example for Zola plc theme

content/02-html-in-markdown.md

Mode
-rw-r--r--
Size
2606 bytes
Reference
content/02-html-in-markdown.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
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
119
120
+++
title = "HTML in markdown"
description = "Raw HTML patterns that work in Zola posts — figures, video, audio, details, embeds, semantic elements, and more."
date = 2026-03-11
[taxonomies]
tags = ["howto"]
+++

Because Zola renders content with `{{ page.content | safe }}`, any HTML you write in markdown is output as-is. This page demonstrates every pattern from the theme README.

## Figure with caption

<figure>
  <img src="/images/placeholder.svg" alt="A placeholder image">
  <figcaption>Figure 1 — a placeholder SVG used for demonstration.</figcaption>
</figure>

---

## Video

Self-hosted video from `static/`. Replace the path with your own file.

<video controls>
  <!-- Place your video file in static/videos/ and update the path below -->
  <source src="/videos/demo.mp4" type="video/mp4">
  Your browser does not support the video element.
</video>

---

## Audio

Self-hosted audio. Replace the path with your own file.

<audio controls>
  <!-- Place your audio file in static/audio/ and update the path below -->
  <source src="/audio/track.mp3" type="audio/mpeg">
  Your browser does not support the audio element.
</audio>

---

## Collapsible sections

### Collapsed by default

<details>
  <summary>Click to expand</summary>

  Hidden content here. Markdown works inside if you leave blank lines around it.

  - Item one
  - Item two

</details>

### Expanded by default

<details open>
  <summary>Already expanded</summary>

  This content is visible on page load. The `open` attribute controls this.

</details>

---

## Embedded content (iframe)

YouTube embed using the privacy-enhanced URL. Replace `VIDEO_ID` with an actual video ID.

<iframe width="560" height="315"
  src="https://www.youtube-nocookie.com/embed/VIDEO_ID"
  frameborder="0" allowfullscreen>
</iframe>

---

## Inline SVG reference

Reference an SVG file from `static/`:

<img src="/diagrams/architecture.svg" alt="System architecture diagram">

---

## Semantic elements

### Keyboard input

Press <kbd>Ctrl</kbd>+<kbd>S</kbd> to save.

### Highlighted text

This is <mark>highlighted text</mark> using the `<mark>` element.

### Abbreviation

<abbr title="HyperText Markup Language">HTML</abbr> is the backbone of the web.

### Machine-readable date

Published on <time datetime="2024-06-01">June 1, 2024</time>.

### Sample output

The compiler returned: <samp>Error: file not found</samp>

---

## Visual indicators

### Meter

Disk usage: <meter value="0.7" min="0" max="1" low="0.3" high="0.7" optimum="0.5">70%</meter>

### Progress bar

Build progress: <progress value="75" max="100">75%</progress>