Skip to content

Commit 0681309

Browse files
committed
Reformat tabbed panes
1 parent 91a9b9f commit 0681309

5 files changed

Lines changed: 73 additions & 74 deletions

File tree

.vscode/cspell.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"anchorize",
77
"Docsy",
88
"errorf",
9+
"Gantt",
10+
"GLFM",
911
"htmltest",
1012
"hugo",
1113
"isset",

docsy.dev/content/en/docs/content/diagrams-and-formulae/index.md

Lines changed: 64 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Diagrams and Formulae
33
weight: 11
44
description: Add generated diagrams and scientific formulae to your site.
5+
cSpell:ignore: goldmark linenos mhchem
56
---
67

78
Docsy has built-in support for a number of diagram creation and typesetting
@@ -94,43 +95,44 @@ additional
9495
have to be created by adding the lines below to your
9596
`hugo.toml`/`hugo.yaml`/`hugo.json` configuration file:
9697

97-
<!-- prettier-ignore-start -->
98-
{{< tabpane >}}
98+
{{< tabpane text=true persist=lang >}}
9999
{{< tab header="Site configuration file:" disabled=true />}}
100-
{{< tab header="hugo.toml" lang="toml" >}}
100+
{{% tab header="hugo.toml" lang="toml" %}}
101+
102+
```toml
101103
[mediaTypes]
102104
[mediaTypes.'font/woff']
103105
suffixes = ['woff']
104106
[mediaTypes.'font/woff2']
105107
suffixes = ['woff2']
106-
{{< /tab >}}
107-
{{< tab header="hugo.yaml" lang="yaml" >}}
108+
```
109+
110+
{{% /tab %}} {{% tab header="hugo.yaml" lang="yaml" %}}
111+
112+
```yaml
108113
mediaTypes:
109114
font/woff:
110-
suffixes:
111-
- woff
115+
suffixes: [woff]
112116
font/woff2:
113-
suffixes:
114-
- woff2
115-
{{< /tab >}}
116-
{{< tab header="hugo.json" lang="json" >}}
117+
suffixes: [woff2]
118+
```
119+
120+
{{% /tab %}} {{% tab header="hugo.json" lang="json" %}}
121+
122+
```json
117123
{
118-
"mediaTypes": {
119-
"font/woff": {
120-
"suffixes": [
121-
"woff"
122-
]
123-
},
124-
"font/woff2": {
125-
"suffixes": [
126-
"woff2"
127-
]
128-
}
129-
}
124+
"mediaTypes": {
125+
"font/woff": {
126+
"suffixes": ["woff"]
127+
},
128+
"font/woff2": {
129+
"suffixes": ["woff2"]
130+
}
131+
}
130132
}
131-
{{< /tab >}}
132-
{{< /tabpane >}}
133-
<!-- prettier-ignore-end -->
133+
```
134+
135+
{{% /tab %}} {{< /tabpane >}}
134136

135137
#### Enable `passthrough` extension
136138

@@ -139,10 +141,11 @@ inside your `hugo.toml`/`hugo.yaml`/`hugo.json`. You can edit this definition to
139141
meet your own needs. For details, see the official
140142
[Hugo docs](https://gohugo.io/content-management/mathematics/#step-1).
141143

142-
<!-- prettier-ignore-start -->
143-
{{< tabpane >}}
144+
{{< tabpane text=true persist=lang >}}
144145
{{< tab header="Site configuration file:" disabled=true />}}
145-
{{< tab header="hugo.toml" lang="toml" >}}
146+
{{% tab header="hugo.toml" lang="toml" %}}
147+
148+
```toml
146149
[markup]
147150
[markup.goldmark]
148151
[markup.goldmark.extensions]
@@ -151,8 +154,11 @@ meet your own needs. For details, see the official
151154
[markup.goldmark.extensions.passthrough.delimiters]
152155
block = [['\[', '\]'], ['$$', '$$']]
153156
inline = [['\(', '\)']]
154-
{{< /tab >}}
155-
{{< tab header="hugo.yaml" lang="yaml" >}}
157+
```
158+
159+
{{% /tab %}} {{% tab header="hugo.yaml" lang="yaml" %}}
160+
161+
```yaml
156162
markup:
157163
goldmark:
158164
extensions:
@@ -161,40 +167,32 @@ markup:
161167
delimiters:
162168
block: [['\[', '\]'], ['$$', '$$']]
163169
inline: [['\(', '\)']]
164-
{{< /tab >}}
165-
{{< tab header="hugo.json" lang="json" >}}
170+
```
171+
172+
{{% /tab %}} {{% tab header="hugo.json" lang="json" %}}
173+
174+
```json
166175
{
167-
"markup": {
168-
"goldmark": {
169-
"extensions": {
170-
"passthrough": {
171-
"delimiters": {
172-
"block": [
173-
[
174-
"\\[",
175-
"\\]"
176-
],
177-
[
178-
"$$",
179-
"$$"
180-
]
181-
],
182-
"inline": [
183-
[
184-
"\\(",
185-
"\\)"
186-
]
187-
]
188-
},
189-
"enable": true
190-
}
191-
}
176+
"markup": {
177+
"goldmark": {
178+
"extensions": {
179+
"passthrough": {
180+
"delimiters": {
181+
"block": [
182+
["\\[", "\\]"],
183+
["$$", "$$"]
184+
],
185+
"inline": [["\\(", "\\)"]]
186+
},
187+
"enable": true
188+
}
192189
}
193-
}
190+
}
191+
}
194192
}
195-
{{< /tab >}}
196-
{{< /tabpane >}}
197-
<!-- prettier-ignore-end -->
193+
```
194+
195+
{{% /tab %}} {{< /tabpane >}}
198196

199197
#### Add `passthrough` render hook
200198

@@ -235,6 +233,7 @@ _Precipitation of barium sulfate:_ \(\ce{SO4^2- + Ba^2+ -> BaSO4 v}\)
235233
More complex equations can be displayed on their own line using the block
236234
delimiters defined:
237235

236+
<!-- cSpell:ignore tetrahydroxozincate mchem -->
238237
<!-- prettier-ignore-start -->
239238
````markdown
240239
\[
@@ -261,7 +260,7 @@ Both standard syntax and `chem` block renders to the same equation:
261260
<!-- prettier-ignore-end -->
262261

263262
{{% alert title="Note" %}} The
264-
[manual](https://mhchem.github.io/MathJax-mhchem/) for mchems input syntax
263+
[manual](https://mhchem.github.io/MathJax-mhchem/) for mchem's input syntax
265264
provides in-depth information about typesetting chemical formulae and physical
266265
units using the `mhchem` tool. {{% /alert %}}
267266

@@ -304,6 +303,8 @@ diagram - no more hunting for the original tools and version to make a new edit.
304303

305304
For example, the following defines a sequence diagram:
306305

306+
<!-- cSpell:ignore autonumber -->
307+
307308
````
308309
```mermaid
309310
sequenceDiagram

docsy.dev/content/en/site/changelog.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,6 @@ See [semver].
7373
- [Active TOC entry tracking][0.13.0-blog-toc] using Bootstrap ScrollSpy
7474
([#2366]).
7575
- [Section sidebar root][0.13.0-blog-sidebar] feature ([#2364]).
76-
- **Server side rendering of mathematical formulae**: we now use Hugo's embedded
77-
KaTeX engine for rendering mathematical formulae and chemical equations. The
78-
engine is auto-activated as soon as mathematical formulae or chemical
79-
equations are encountered. There is no need to activate or configure KaTeX any
80-
more.
8176

8277
**Other changes**:
8378

@@ -91,6 +86,8 @@ See [semver].
9186
- Dependency updates: Bootstrap 5.3.8, Hugo 0.152.2, Node LTS ≥24.
9287
- Updated translations: added Occitan locale ([#2173]) and refreshed Simplified
9388
Chinese ([#2313]) and Ukrainian ([#2331]).
89+
- **Server-side rendering of mathematical formulae**: now using Hugo's embedded
90+
KaTeX engine. For details, see [LaTeX support with KaTeX][diagrams-formulae].
9491

9592
**Experimental**:
9693

@@ -124,6 +121,8 @@ See [semver].
124121
[0.13.0-blog-accessibility]: /blog/2025/0.13.0/#accessibility
125122
[0.13.0-blog-fouc]: /blog/2025/0.13.0/#accessibility
126123
[0.13.0-blog-breaking]: /blog/2025/0.13.0/#breaking-changes
124+
[diagrams-formulae]:
125+
/docs/content/diagrams-and-formulae/#latex-support-with-katex
127126
[How to pick colors with good color-contrast]:
128127
/docs/content/lookandfeel/#pick-good-color-contrast
129128

docsy.dev/hugo.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,7 @@ module:
162162

163163
mediaTypes:
164164
font/woff:
165-
suffixes:
166-
- woff
165+
suffixes: [woff]
167166
font/woff2:
168-
suffixes:
169-
- woff2
170-
167+
suffixes: [woff2]
171168
# cSpell:ignore docsy github goldmark markmap plantuml readingtime

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docsy",
3-
"version": "0.13.0-dev+68-g26a0c57",
3+
"version": "0.13.0-dev+69-gee89baf",
44
"repository": "github:google/docsy",
55
"homepage": "https://www.docsy.dev",
66
"license": "Apache-2.0",

0 commit comments

Comments
 (0)