@inditextech/docouture-cli 0.1.0-SNAPSHOT.40.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/bin.js +321 -0
- package/build/commands/build.js +22 -0
- package/build/commands/completion.js +69 -0
- package/build/commands/dev.js +67 -0
- package/build/commands/doctor.js +156 -0
- package/build/commands/eject.js +71 -0
- package/build/commands/new.js +512 -0
- package/build/commands/publish.js +111 -0
- package/build/commands/teardown.js +66 -0
- package/build/commands/upgrade.js +156 -0
- package/build/commands/version.js +60 -0
- package/build/lib/agents-md.js +67 -0
- package/build/lib/antora-log.js +36 -0
- package/build/lib/antora-yml.js +47 -0
- package/build/lib/args.js +26 -0
- package/build/lib/cli-context.js +17 -0
- package/build/lib/cli-info.js +20 -0
- package/build/lib/config-resolver.js +23 -0
- package/build/lib/copy-template.js +162 -0
- package/build/lib/debug-log.js +21 -0
- package/build/lib/detect-package-manager.js +79 -0
- package/build/lib/dev-server.js +337 -0
- package/build/lib/doctor-checks.js +240 -0
- package/build/lib/global-flags.js +31 -0
- package/build/lib/kroki-compose.js +54 -0
- package/build/lib/playbook-yml.js +90 -0
- package/build/lib/repo-root.js +21 -0
- package/build/lib/run-script.js +50 -0
- package/build/lib/theme.js +51 -0
- package/build/templates/agent-support/.claude/skills/docs-internals/SKILL.md +53 -0
- package/build/templates/agent-support/.claude/skills/docs-internals/reference/antora-extensions.md +54 -0
- package/build/templates/agent-support/.claude/skills/docs-internals/reference/naming.md +41 -0
- package/build/templates/agent-support/.claude/skills/docs-internals/reference/page-patterns.md +238 -0
- package/build/templates/agent-support/.claude/skills/docs-versioning.versioned/SKILL.md +37 -0
- package/build/templates/agent-support/.claude/skills/docs-versioning.versioned/reference/releasing.md +106 -0
- package/build/templates/agent-support/.claude/skills/documenting-your-repo/SKILL.md +55 -0
- package/build/templates/agent-support/.claude/skills/documenting-your-repo/reference/content-sourcing.md +55 -0
- package/build/templates/agent-support/.claude/skills/documenting-your-repo/reference/maintenance-loop.md +68 -0
- package/build/templates/agent-support/.claude/skills/documenting-your-repo/reference/structure-planning.md +102 -0
- package/build/templates/agent-support/.claude/skills/writing-docs-pages/SKILL.md +112 -0
- package/build/templates/agent-support/.claude/skills/writing-docs-pages/reference/docouture-blocks.md +170 -0
- package/build/templates/agent-support/.claude/skills/writing-docs-pages/reference/language-basics.md +402 -0
- package/build/templates/agent-support/.opencode/skills/docs-internals/SKILL.md +53 -0
- package/build/templates/agent-support/.opencode/skills/docs-internals/reference/antora-extensions.md +54 -0
- package/build/templates/agent-support/.opencode/skills/docs-internals/reference/naming.md +41 -0
- package/build/templates/agent-support/.opencode/skills/docs-internals/reference/page-patterns.md +238 -0
- package/build/templates/agent-support/.opencode/skills/docs-versioning.versioned/SKILL.md +37 -0
- package/build/templates/agent-support/.opencode/skills/docs-versioning.versioned/reference/releasing.md +106 -0
- package/build/templates/agent-support/.opencode/skills/documenting-your-repo/SKILL.md +55 -0
- package/build/templates/agent-support/.opencode/skills/documenting-your-repo/reference/content-sourcing.md +55 -0
- package/build/templates/agent-support/.opencode/skills/documenting-your-repo/reference/maintenance-loop.md +68 -0
- package/build/templates/agent-support/.opencode/skills/documenting-your-repo/reference/structure-planning.md +102 -0
- package/build/templates/agent-support/.opencode/skills/writing-docs-pages/SKILL.md +112 -0
- package/build/templates/agent-support/.opencode/skills/writing-docs-pages/reference/docouture-blocks.md +170 -0
- package/build/templates/agent-support/.opencode/skills/writing-docs-pages/reference/language-basics.md +402 -0
- package/build/templates/agent-support/AGENTS.md +72 -0
- package/build/templates/starter/antora-playbook.local.yml +99 -0
- package/build/templates/starter/antora-playbook.versioned.yml +167 -0
- package/build/templates/starter/antora-playbook.yml +189 -0
- package/build/templates/starter/gitignore +3 -0
- package/build/templates/starter/package.json +37 -0
- package/build/templates/starter/scripts/check-links.mjs +178 -0
- package/build/templates/starter/src/antora.yml +85 -0
- package/build/templates/starter/src/modules/ROOT/images/card-placeholder.png +0 -0
- package/build/templates/starter/src/modules/ROOT/images/feature-placeholder-dark.png +0 -0
- package/build/templates/starter/src/modules/ROOT/images/feature-placeholder.png +0 -0
- package/build/templates/starter/src/modules/ROOT/images/hero-placeholder.png +0 -0
- package/build/templates/starter/src/modules/ROOT/pages/index.adoc +124 -0
- package/build/templates/starter/src/modules/main/nav.adoc +19 -0
- package/build/templates/starter/src/modules/main/pages/app.adoc +5 -0
- package/build/templates/starter/src/modules/main/pages/architecture.adoc +6 -0
- package/build/templates/starter/src/modules/main/pages/changelog/index.adoc +9 -0
- package/build/templates/starter/src/modules/main/pages/components.adoc +701 -0
- package/build/templates/starter/src/modules/main/pages/contributing.adoc +6 -0
- package/build/templates/starter/src/modules/main/pages/getting-started.adoc +169 -0
- package/build/templates/starter/src/modules/main/pages/glossary.adoc +8 -0
- package/build/templates/starter/src/modules/main/pages/index.adoc +9 -0
- package/build/templates/starter/src/modules/main/pages/prerequisites.adoc +55 -0
- package/build/templates/starter/src/modules/main/pages/quickstart.adoc +21 -0
- package/build/templates/starter/src/modules/main/pages/release-notes/index.adoc +9 -0
- package/build/templates/starter/src/modules/main/pages/requirements.adoc +8 -0
- package/build/templates/starter/src/modules/main/pages/roadmap.adoc +4 -0
- package/build/templates/starter/src/modules/main/pages/structure.adoc +5 -0
- package/build/templates/starter/src/release-version.versioned +1 -0
- package/build/templates/starter/supplemental-ui/favicon.ico +0 -0
- package/build/templates/starter/supplemental-ui/product-logo-dark.png +0 -0
- package/build/templates/starter/supplemental-ui/product-logo.png +0 -0
- package/build/templates/workflows/docouture-kroki-cache-warm.yml +101 -0
- package/build/templates/workflows/docouture-pr-verify.yml +120 -0
- package/build/templates/workflows/docouture-publish-prerelease.yml +122 -0
- package/build/templates/workflows/docouture-publish.yml +138 -0
- package/build/templates/workflows/docouture-release-preview.yml +198 -0
- package/build/templates/workflows/docouture-release.yml +414 -0
- package/package.json +38 -0
|
@@ -0,0 +1,701 @@
|
|
|
1
|
+
= AsciiDoc components
|
|
2
|
+
:page-toclevels: 3
|
|
3
|
+
:experimental:
|
|
4
|
+
|
|
5
|
+
Every block and macro this scaffold's toolchain understands, rendered once so you can see
|
|
6
|
+
what each one actually looks like before reaching for it in real content. The first half
|
|
7
|
+
is plain AsciiDoc — nothing docouture-specific, all of it documented in full in the
|
|
8
|
+
`writing-docs-pages` skill's `reference/language-basics.md`. The second half is this
|
|
9
|
+
site's own custom blocks, registered by `@inditextech/docouture-asciidoc-extensions` and
|
|
10
|
+
documented in that same skill's `reference/docouture-blocks.md`. Delete this page (and its
|
|
11
|
+
`nav.adoc` entry) once you no longer need the reference — nothing else on the site links
|
|
12
|
+
to it.
|
|
13
|
+
|
|
14
|
+
== AsciiDoc basics
|
|
15
|
+
|
|
16
|
+
=== Headings and structure
|
|
17
|
+
|
|
18
|
+
Sections nest by repeating `=` — `==`, `===`, `====`, `=====` — never by skipping a
|
|
19
|
+
level. This page is itself at the first real section level (`==`); the next few
|
|
20
|
+
subsections go one level deeper.
|
|
21
|
+
|
|
22
|
+
[discrete]
|
|
23
|
+
==== A discrete heading
|
|
24
|
+
|
|
25
|
+
`[discrete]` above a heading keeps it out of both the navigation outline and the page's
|
|
26
|
+
own TOC — useful for a heading that organizes the page visually without being a real
|
|
27
|
+
subsection of it.
|
|
28
|
+
|
|
29
|
+
=== Text formatting
|
|
30
|
+
|
|
31
|
+
*bold* and **b*o*ld mid-word**, _italic_ and it__ali__c mid-word, `mono`, `+literal, no
|
|
32
|
+
subs+`, #marked text#, [.underline]#a span with a role#. Chemical formula: H~2~0.
|
|
33
|
+
Exponent: E = mc^2^. A footnote after this sentencefootnote:[The footnote text itself,
|
|
34
|
+
rendered at the bottom of the page.].
|
|
35
|
+
|
|
36
|
+
=== Lists
|
|
37
|
+
|
|
38
|
+
Unordered, with a nested item carrying its own attached paragraph:
|
|
39
|
+
|
|
40
|
+
[,asciidoc]
|
|
41
|
+
----
|
|
42
|
+
* first
|
|
43
|
+
* second
|
|
44
|
+
** nested
|
|
45
|
+
+
|
|
46
|
+
Attached via the `+` continuation.
|
|
47
|
+
----
|
|
48
|
+
|
|
49
|
+
* first
|
|
50
|
+
* second
|
|
51
|
+
** nested
|
|
52
|
+
+
|
|
53
|
+
Attached via the `+` continuation.
|
|
54
|
+
|
|
55
|
+
Ordered, custom numbering:
|
|
56
|
+
|
|
57
|
+
[upperalpha]
|
|
58
|
+
. first
|
|
59
|
+
. second
|
|
60
|
+
. third
|
|
61
|
+
|
|
62
|
+
Custom unordered markers:
|
|
63
|
+
|
|
64
|
+
[square]
|
|
65
|
+
* square-marked
|
|
66
|
+
* another
|
|
67
|
+
|
|
68
|
+
[circle]
|
|
69
|
+
* circle-marked
|
|
70
|
+
* another
|
|
71
|
+
|
|
72
|
+
Description list, then its horizontal variant:
|
|
73
|
+
|
|
74
|
+
term:: definition
|
|
75
|
+
another term:: definition
|
|
76
|
+
|
|
77
|
+
[horizontal]
|
|
78
|
+
term:: definition
|
|
79
|
+
another term:: definition
|
|
80
|
+
|
|
81
|
+
A checklist:
|
|
82
|
+
|
|
83
|
+
* [ ] not done yet
|
|
84
|
+
* [x] done
|
|
85
|
+
|
|
86
|
+
=== Links and cross references
|
|
87
|
+
|
|
88
|
+
https://example.com[An external link], https://example.com[same, opened in a new
|
|
89
|
+
tab^], link:https://example.com[the explicit macro], mailto:docs@example.com[a mail
|
|
90
|
+
link]. Referring to another page on this site: xref:main:getting-started.adoc[] — empty
|
|
91
|
+
xref text renders that page's own title, so it stays correct if the title changes. A
|
|
92
|
+
fragment: xref:main:getting-started.adoc#add-a-page[a specific section on that page].
|
|
93
|
+
|
|
94
|
+
=== Images and icons
|
|
95
|
+
|
|
96
|
+
.A block image, capped at its own natural size
|
|
97
|
+
image::ROOT:hero-placeholder.png[A placeholder image,480]
|
|
98
|
+
|
|
99
|
+
An inline image sits mid-paragraph: image:ROOT:card-placeholder.png[A small inline
|
|
100
|
+
placeholder,20,20] like so. Font icons, keyboard shortcuts and UI paths:
|
|
101
|
+
icon:check[] done, kbd:[Ctrl+C] to copy, btn:[Save] to save, menu:File[Save As] to open
|
|
102
|
+
the save-as dialog.
|
|
103
|
+
|
|
104
|
+
=== Admonitions
|
|
105
|
+
|
|
106
|
+
NOTE: The one-line form — good for a single sentence.
|
|
107
|
+
|
|
108
|
+
[TIP]
|
|
109
|
+
====
|
|
110
|
+
The multi-line form — anything can go inside, including another block.
|
|
111
|
+
|
|
112
|
+
[,console]
|
|
113
|
+
----
|
|
114
|
+
$ npm run build
|
|
115
|
+
----
|
|
116
|
+
====
|
|
117
|
+
|
|
118
|
+
IMPORTANT: Five types exist: NOTE, TIP, IMPORTANT, WARNING, CAUTION. A sixth needs a role
|
|
119
|
+
plus custom CSS, not a new admonition type.
|
|
120
|
+
|
|
121
|
+
[WARNING]
|
|
122
|
+
====
|
|
123
|
+
Multi-line WARNING.
|
|
124
|
+
====
|
|
125
|
+
|
|
126
|
+
[CAUTION]
|
|
127
|
+
====
|
|
128
|
+
Multi-line CAUTION.
|
|
129
|
+
====
|
|
130
|
+
|
|
131
|
+
=== Source code
|
|
132
|
+
|
|
133
|
+
[,typescript]
|
|
134
|
+
----
|
|
135
|
+
const answer: number = 42
|
|
136
|
+
----
|
|
137
|
+
|
|
138
|
+
A block with no language at all still gets the code surface and copy button, just no
|
|
139
|
+
syntax colour:
|
|
140
|
+
|
|
141
|
+
[source]
|
|
142
|
+
----
|
|
143
|
+
plain text, no highlighting
|
|
144
|
+
----
|
|
145
|
+
|
|
146
|
+
Callouts, explained in a colon list right after the block:
|
|
147
|
+
|
|
148
|
+
[,js]
|
|
149
|
+
----
|
|
150
|
+
const x = 1 // <1>
|
|
151
|
+
const y = x + 1 // <2>
|
|
152
|
+
----
|
|
153
|
+
<1> Set `x` to `1`.
|
|
154
|
+
<2> Derive `y` from it.
|
|
155
|
+
|
|
156
|
+
The `.wrap` role lets long lines wrap instead of scrolling horizontally:
|
|
157
|
+
|
|
158
|
+
[.wrap,js]
|
|
159
|
+
----
|
|
160
|
+
const config = { alpha: 1, beta: 2, gamma: 3, delta: 4, epsilon: 5, zeta: 6, eta: 7 }
|
|
161
|
+
----
|
|
162
|
+
|
|
163
|
+
=== Tables
|
|
164
|
+
|
|
165
|
+
A basic table with a header row:
|
|
166
|
+
|
|
167
|
+
[cols="1,2,1"]
|
|
168
|
+
|===
|
|
169
|
+
|Name |Description |Default
|
|
170
|
+
|
|
171
|
+
|`retry.max-attempts`
|
|
172
|
+
|Number of times a failed request is retried.
|
|
173
|
+
|`3`
|
|
174
|
+
|
|
175
|
+
|`retry.backoff`
|
|
176
|
+
|Base delay between retries; doubles each attempt.
|
|
177
|
+
|`200ms`
|
|
178
|
+
|===
|
|
179
|
+
|
|
180
|
+
`%autowidth` shrinks the table to its content instead of filling the column:
|
|
181
|
+
|
|
182
|
+
[%autowidth]
|
|
183
|
+
|===
|
|
184
|
+
|Status |Value
|
|
185
|
+
|Build |passing
|
|
186
|
+
|Coverage |92%
|
|
187
|
+
|===
|
|
188
|
+
|
|
189
|
+
`%noheader` with a percentage width:
|
|
190
|
+
|
|
191
|
+
[%noheader,width=50%]
|
|
192
|
+
|===
|
|
193
|
+
|Node.js |`>= 24`
|
|
194
|
+
|pnpm |`>= 10`
|
|
195
|
+
|===
|
|
196
|
+
|
|
197
|
+
An absolute pixel width via `table-width=` (bypasses Asciidoctor's own percentage-only
|
|
198
|
+
`width=`), with `nowrap-cols=` pinning specific columns so their tokens never break
|
|
199
|
+
mid-word:
|
|
200
|
+
|
|
201
|
+
[table-width=520px,cols="2,1,2",nowrap-cols="1,2"]
|
|
202
|
+
|===
|
|
203
|
+
|Property |Type |Notes
|
|
204
|
+
|
|
205
|
+
|`timeout.connect`
|
|
206
|
+
|`duration`
|
|
207
|
+
|Maximum time to wait for a connection.
|
|
208
|
+
|
|
209
|
+
|`timeout.read`
|
|
210
|
+
|`duration`
|
|
211
|
+
|Maximum time to wait for a response once connected.
|
|
212
|
+
|===
|
|
213
|
+
|
|
214
|
+
Column/cell styles (`a` asciidoc, `l` literal, `m` monospace, `h` header, `s` strong) and
|
|
215
|
+
a column span:
|
|
216
|
+
|
|
217
|
+
[cols="1,1,2"]
|
|
218
|
+
|===
|
|
219
|
+
|Name |Type |Values
|
|
220
|
+
|
|
221
|
+
|size
|
|
222
|
+
|enum
|
|
223
|
+
|`small` \| `medium` \| `large`
|
|
224
|
+
|
|
225
|
+
2+|spans two columns
|
|
226
|
+
|third cell
|
|
227
|
+
|===
|
|
228
|
+
|
|
229
|
+
=== Quotes and sidebars
|
|
230
|
+
|
|
231
|
+
[quote,Grace Hopper]
|
|
232
|
+
____
|
|
233
|
+
The most dangerous phrase in the language is, "We've always done it this way."
|
|
234
|
+
____
|
|
235
|
+
|
|
236
|
+
[verse]
|
|
237
|
+
____
|
|
238
|
+
Two roads diverged in a wood, and I—
|
|
239
|
+
I took the one less traveled by.
|
|
240
|
+
____
|
|
241
|
+
|
|
242
|
+
.A sidebar
|
|
243
|
+
****
|
|
244
|
+
Asides, pull quotes, or background information that supplements the main flow without
|
|
245
|
+
interrupting it.
|
|
246
|
+
****
|
|
247
|
+
|
|
248
|
+
=== Collapsible
|
|
249
|
+
|
|
250
|
+
A single, standalone collapsible — for grouping several together with proper `role=group`
|
|
251
|
+
semantics and single-open behaviour, see `[accordion]` below instead.
|
|
252
|
+
|
|
253
|
+
.Click to expand
|
|
254
|
+
[%collapsible]
|
|
255
|
+
====
|
|
256
|
+
Rendered as a native `<details>` element — works with JavaScript off.
|
|
257
|
+
====
|
|
258
|
+
|
|
259
|
+
== Custom blocks
|
|
260
|
+
|
|
261
|
+
Registered by `@inditextech/docouture-asciidoc-extensions`. Every one of these degrades to
|
|
262
|
+
plain, readable HTML with JavaScript disabled.
|
|
263
|
+
|
|
264
|
+
=== Tabs
|
|
265
|
+
|
|
266
|
+
A switcher for equivalent alternatives. Each `[tabs]` block is independent — picking a
|
|
267
|
+
tab in one never affects another further down the page.
|
|
268
|
+
|
|
269
|
+
[tabs]
|
|
270
|
+
--
|
|
271
|
+
[tab,label="pnpm"]
|
|
272
|
+
****
|
|
273
|
+
[,bash]
|
|
274
|
+
----
|
|
275
|
+
pnpm add some-package
|
|
276
|
+
----
|
|
277
|
+
****
|
|
278
|
+
|
|
279
|
+
[tab,label="npm"]
|
|
280
|
+
****
|
|
281
|
+
[,bash]
|
|
282
|
+
----
|
|
283
|
+
npm install some-package
|
|
284
|
+
----
|
|
285
|
+
****
|
|
286
|
+
|
|
287
|
+
[tab,label="yarn"]
|
|
288
|
+
****
|
|
289
|
+
[,bash]
|
|
290
|
+
----
|
|
291
|
+
yarn add some-package
|
|
292
|
+
----
|
|
293
|
+
****
|
|
294
|
+
--
|
|
295
|
+
|
|
296
|
+
A second, independent set:
|
|
297
|
+
|
|
298
|
+
[tabs]
|
|
299
|
+
--
|
|
300
|
+
[tab,label="pnpm"]
|
|
301
|
+
****
|
|
302
|
+
[,bash]
|
|
303
|
+
----
|
|
304
|
+
pnpm run dev
|
|
305
|
+
----
|
|
306
|
+
****
|
|
307
|
+
|
|
308
|
+
[tab,label="npm"]
|
|
309
|
+
****
|
|
310
|
+
[,bash]
|
|
311
|
+
----
|
|
312
|
+
npm run dev
|
|
313
|
+
----
|
|
314
|
+
****
|
|
315
|
+
--
|
|
316
|
+
|
|
317
|
+
=== Cards
|
|
318
|
+
|
|
319
|
+
Text-only — no image, no open block needed:
|
|
320
|
+
|
|
321
|
+
[cards]
|
|
322
|
+
====
|
|
323
|
+
[card]
|
|
324
|
+
.xref:main:getting-started.adoc[Getting started]
|
|
325
|
+
Add a page, build the site, publish it.
|
|
326
|
+
|
|
327
|
+
[card,subheader="Reference"]
|
|
328
|
+
.xref:main:quickstart.adoc[Quickstart]
|
|
329
|
+
The smallest path to a working result, as concrete steps.
|
|
330
|
+
|
|
331
|
+
[card,icon="design/grid-outlined"]
|
|
332
|
+
.xref:main:architecture.adoc[Architecture]
|
|
333
|
+
This one carries a header icon instead of a subheader.
|
|
334
|
+
====
|
|
335
|
+
|
|
336
|
+
With images, a fixed square aspect, four columns, let out to the container's full width —
|
|
337
|
+
the same shape the landing's own quicklinks use (`ROOT:card-placeholder.png` reused
|
|
338
|
+
across modules via a cross-module image resource ID):
|
|
339
|
+
|
|
340
|
+
[cards,type=image-square,columns="1 s:2 m:4",width=container]
|
|
341
|
+
====
|
|
342
|
+
[card,subheader="One"]
|
|
343
|
+
.xref:main:getting-started.adoc[First]
|
|
344
|
+
--
|
|
345
|
+
image::ROOT:card-placeholder.png[Placeholder card image]
|
|
346
|
+
|
|
347
|
+
Every card in a block shares one aspect ratio.
|
|
348
|
+
--
|
|
349
|
+
|
|
350
|
+
[card,subheader="Two"]
|
|
351
|
+
.xref:main:index.adoc[Second]
|
|
352
|
+
--
|
|
353
|
+
image::ROOT:card-placeholder.png[Placeholder card image]
|
|
354
|
+
|
|
355
|
+
The image crops to fill; it is never letterboxed.
|
|
356
|
+
--
|
|
357
|
+
====
|
|
358
|
+
|
|
359
|
+
=== Accordion
|
|
360
|
+
|
|
361
|
+
Groups a run of `[%collapsible]` items with `role=group` semantics. `%single-open` closes
|
|
362
|
+
whichever other item was open; without it, items are independent.
|
|
363
|
+
|
|
364
|
+
[accordion%single-open,aria-label="Single-open example"]
|
|
365
|
+
--
|
|
366
|
+
.First question?
|
|
367
|
+
[%collapsible]
|
|
368
|
+
====
|
|
369
|
+
First answer.
|
|
370
|
+
====
|
|
371
|
+
|
|
372
|
+
.Second question?
|
|
373
|
+
[%collapsible]
|
|
374
|
+
====
|
|
375
|
+
Second answer. Opening this closes the first.
|
|
376
|
+
====
|
|
377
|
+
--
|
|
378
|
+
|
|
379
|
+
Grouped, but independent (the default — no `%single-open`):
|
|
380
|
+
|
|
381
|
+
[accordion,aria-label="Multiple-open example"]
|
|
382
|
+
--
|
|
383
|
+
.Can both of these be open at once?
|
|
384
|
+
[%collapsible]
|
|
385
|
+
====
|
|
386
|
+
Yes — this group has no `%single-open`, so each item toggles independently.
|
|
387
|
+
====
|
|
388
|
+
|
|
389
|
+
.Is this still one accessible group?
|
|
390
|
+
[%collapsible]
|
|
391
|
+
====
|
|
392
|
+
Yes — `aria-label=` (or a block `.Title`) names the group as a whole.
|
|
393
|
+
====
|
|
394
|
+
--
|
|
395
|
+
|
|
396
|
+
=== Feature tabs
|
|
397
|
+
|
|
398
|
+
A media-plus-prose switcher for a handful of top-level capabilities, same block the
|
|
399
|
+
landing's "Key features" section uses:
|
|
400
|
+
|
|
401
|
+
[feature-tabs]
|
|
402
|
+
====
|
|
403
|
+
[feature,label="With a call to action"]
|
|
404
|
+
--
|
|
405
|
+
image::ROOT:feature-placeholder.png[Placeholder feature image]
|
|
406
|
+
image::ROOT:feature-placeholder-dark.png[role=dark]
|
|
407
|
+
|
|
408
|
+
A slide is a media still, prose, and an optional call to action, in that order.
|
|
409
|
+
|
|
410
|
+
[.cta]
|
|
411
|
+
xref:main:getting-started.adoc[Learn more]
|
|
412
|
+
--
|
|
413
|
+
|
|
414
|
+
[feature,label="Without one"]
|
|
415
|
+
--
|
|
416
|
+
image::ROOT:feature-placeholder.png[Placeholder feature image]
|
|
417
|
+
image::ROOT:feature-placeholder-dark.png[role=dark]
|
|
418
|
+
|
|
419
|
+
A call to action is optional — a slide without one just ends at its prose.
|
|
420
|
+
--
|
|
421
|
+
====
|
|
422
|
+
|
|
423
|
+
=== CTA
|
|
424
|
+
|
|
425
|
+
A single, full-width call-to-action band:
|
|
426
|
+
|
|
427
|
+
[cta]
|
|
428
|
+
====
|
|
429
|
+
A short pitch, plus one prominent action.
|
|
430
|
+
|
|
431
|
+
[.primary]
|
|
432
|
+
xref:main:getting-started.adoc[Get started]
|
|
433
|
+
====
|
|
434
|
+
|
|
435
|
+
=== Diagrams
|
|
436
|
+
|
|
437
|
+
`[mermaid]`, `[plantuml]`, `[graphviz]` and a handful of other diagram languages (see
|
|
438
|
+
`@inditextech/docouture-asciidoc-extensions`' `lib/kroki-config.js` for the full list) render
|
|
439
|
+
as real diagrams via a self-hosted https://kroki.io[Kroki] service — a literal block
|
|
440
|
+
(four dots, not a fenced code block) styled with the diagram language's name:
|
|
441
|
+
|
|
442
|
+
[,asciidoc]
|
|
443
|
+
----
|
|
444
|
+
[mermaid]
|
|
445
|
+
....
|
|
446
|
+
stateDiagram-v2
|
|
447
|
+
[*] --> Idle
|
|
448
|
+
Idle --> Running : start
|
|
449
|
+
Running --> Idle : stop
|
|
450
|
+
....
|
|
451
|
+
----
|
|
452
|
+
|
|
453
|
+
[mermaid]
|
|
454
|
+
....
|
|
455
|
+
stateDiagram-v2
|
|
456
|
+
[*] --> Idle
|
|
457
|
+
Idle --> Running : start
|
|
458
|
+
Running --> Idle : stop
|
|
459
|
+
....
|
|
460
|
+
|
|
461
|
+
This feature is **enabled by default** in this starter (see `antora-playbook.yml`'s
|
|
462
|
+
`kroki-enabled`/`kroki-diagram-types` attributes) — it needs Docker available, since the
|
|
463
|
+
build starts a self-hosted Kroki service the first time a build needs it, no manual step
|
|
464
|
+
required (it isn't stopped automatically either — run `docouture teardown kroki` once you're
|
|
465
|
+
done with it). Run `docouture eject kroki` if you ever need to customize the container
|
|
466
|
+
definition, or comment the two attributes back out to turn the feature off entirely — a
|
|
467
|
+
block like the one above then renders exactly as plain AsciiDoc already would: the raw
|
|
468
|
+
diagram source, as literal text, same as the fenced listing shows it above.
|
|
469
|
+
|
|
470
|
+
==== Styling
|
|
471
|
+
|
|
472
|
+
Mermaid diagrams are themed to match the IOP Design System automatically — square
|
|
473
|
+
corners, black-on-white (light mode; inverted for dark), body typography — via a
|
|
474
|
+
`%%{init: {...}}%%` directive this extension prepends to the diagram's own source
|
|
475
|
+
before it ever reaches Kroki, not via CSS. Write your own `%%{init...}%%` as the
|
|
476
|
+
diagram's first line to opt out and take full control of Mermaid's own theming instead.
|
|
477
|
+
Every other diagram type's font is still normalized via CSS (safe — a tool's typeface
|
|
478
|
+
choice carries no meaning); BPMN's two-tone palette is still remapped via CSS too
|
|
479
|
+
(its bpmn-js renderer has no source-level theming hook this package uses yet, unlike
|
|
480
|
+
Mermaid's). BPMN's own rounded task-box corners could not be un-rounded by any means
|
|
481
|
+
found — bpmn-js hardcodes that radius; this is a real, currently-unfixed limitation,
|
|
482
|
+
not an oversight.
|
|
483
|
+
|
|
484
|
+
==== PNG output
|
|
485
|
+
|
|
486
|
+
`[mermaid,format=png]` (or any other diagram language Kroki can rasterize — see
|
|
487
|
+
`kroki-config.js`'s `PNG_SUPPORTED_TYPES` for the full list; `bpmn` and `excalidraw`
|
|
488
|
+
are notably **not** on it, Kroki itself rejects `/bpmn/png` and `/excalidraw/png`
|
|
489
|
+
outright) renders a transparent PNG instead of inline SVG:
|
|
490
|
+
|
|
491
|
+
[,asciidoc]
|
|
492
|
+
----
|
|
493
|
+
[mermaid,format=png]
|
|
494
|
+
....
|
|
495
|
+
stateDiagram-v2
|
|
496
|
+
[*] --> Idle
|
|
497
|
+
Idle --> Running : start
|
|
498
|
+
Running --> Idle : stop
|
|
499
|
+
....
|
|
500
|
+
----
|
|
501
|
+
|
|
502
|
+
[mermaid,format=png]
|
|
503
|
+
....
|
|
504
|
+
stateDiagram-v2
|
|
505
|
+
[*] --> Idle
|
|
506
|
+
Idle --> Running : start
|
|
507
|
+
Running --> Idle : stop
|
|
508
|
+
....
|
|
509
|
+
|
|
510
|
+
Embedded as a plain `<img>` with a base64 `data:` URI — no extra file written, no extra
|
|
511
|
+
HTTP request. Reach for this only when you actually need a raster image (an export, an
|
|
512
|
+
email, a renderer that can't handle inline SVG); the inline-SVG default stays sharper at
|
|
513
|
+
every zoom level and lets a reader select/search the diagram's own text, neither of
|
|
514
|
+
which a PNG can do. An unsupported type or a typo'd `format=` value both fall back to
|
|
515
|
+
`svg` with a build warning, the same degrade-not-fail posture as an unknown
|
|
516
|
+
`kroki-diagram-types` entry.
|
|
517
|
+
|
|
518
|
+
==== BPMN
|
|
519
|
+
|
|
520
|
+
`[bpmn]` renders BPMN 2.0 XML (the same format bpmn.io and most process-modeling tools
|
|
521
|
+
export). Like `mermaid` and `excalidraw`, it needs its own headless-Chrome companion
|
|
522
|
+
container — the bundled `kroki-compose.yml` already includes one:
|
|
523
|
+
|
|
524
|
+
[,asciidoc]
|
|
525
|
+
----
|
|
526
|
+
[bpmn]
|
|
527
|
+
....
|
|
528
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
529
|
+
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
|
|
530
|
+
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
|
|
531
|
+
xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"
|
|
532
|
+
xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"
|
|
533
|
+
id="definitions" targetNamespace="http://bpmn.io/schema/bpmn">
|
|
534
|
+
<process id="process_1" isExecutable="false">
|
|
535
|
+
<startEvent id="start" name="Request received"/>
|
|
536
|
+
<task id="task" name="Handle request"/>
|
|
537
|
+
<endEvent id="end" name="Done"/>
|
|
538
|
+
<sequenceFlow id="flow_1" sourceRef="start" targetRef="task"/>
|
|
539
|
+
<sequenceFlow id="flow_2" sourceRef="task" targetRef="end"/>
|
|
540
|
+
</process>
|
|
541
|
+
<bpmndi:BPMNDiagram id="diagram">
|
|
542
|
+
<bpmndi:BPMNPlane id="plane" bpmnElement="process_1">
|
|
543
|
+
<bpmndi:BPMNShape id="start_di" bpmnElement="start">
|
|
544
|
+
<omgdc:Bounds x="100" y="100" width="36" height="36"/>
|
|
545
|
+
</bpmndi:BPMNShape>
|
|
546
|
+
<bpmndi:BPMNShape id="task_di" bpmnElement="task">
|
|
547
|
+
<omgdc:Bounds x="200" y="78" width="100" height="80"/>
|
|
548
|
+
</bpmndi:BPMNShape>
|
|
549
|
+
<bpmndi:BPMNShape id="end_di" bpmnElement="end">
|
|
550
|
+
<omgdc:Bounds x="360" y="100" width="36" height="36"/>
|
|
551
|
+
</bpmndi:BPMNShape>
|
|
552
|
+
<bpmndi:BPMNEdge id="flow_1_di" bpmnElement="flow_1">
|
|
553
|
+
<omgdi:waypoint x="136" y="118"/>
|
|
554
|
+
<omgdi:waypoint x="200" y="118"/>
|
|
555
|
+
</bpmndi:BPMNEdge>
|
|
556
|
+
<bpmndi:BPMNEdge id="flow_2_di" bpmnElement="flow_2">
|
|
557
|
+
<omgdi:waypoint x="300" y="118"/>
|
|
558
|
+
<omgdi:waypoint x="360" y="118"/>
|
|
559
|
+
</bpmndi:BPMNEdge>
|
|
560
|
+
</bpmndi:BPMNPlane>
|
|
561
|
+
</bpmndi:BPMNDiagram>
|
|
562
|
+
</definitions>
|
|
563
|
+
....
|
|
564
|
+
----
|
|
565
|
+
|
|
566
|
+
[bpmn]
|
|
567
|
+
....
|
|
568
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
569
|
+
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
|
|
570
|
+
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
|
|
571
|
+
xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"
|
|
572
|
+
xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"
|
|
573
|
+
id="definitions" targetNamespace="http://bpmn.io/schema/bpmn">
|
|
574
|
+
<process id="process_1" isExecutable="false">
|
|
575
|
+
<startEvent id="start" name="Request received"/>
|
|
576
|
+
<task id="task" name="Handle request"/>
|
|
577
|
+
<endEvent id="end" name="Done"/>
|
|
578
|
+
<sequenceFlow id="flow_1" sourceRef="start" targetRef="task"/>
|
|
579
|
+
<sequenceFlow id="flow_2" sourceRef="task" targetRef="end"/>
|
|
580
|
+
</process>
|
|
581
|
+
<bpmndi:BPMNDiagram id="diagram">
|
|
582
|
+
<bpmndi:BPMNPlane id="plane" bpmnElement="process_1">
|
|
583
|
+
<bpmndi:BPMNShape id="start_di" bpmnElement="start">
|
|
584
|
+
<omgdc:Bounds x="100" y="100" width="36" height="36"/>
|
|
585
|
+
</bpmndi:BPMNShape>
|
|
586
|
+
<bpmndi:BPMNShape id="task_di" bpmnElement="task">
|
|
587
|
+
<omgdc:Bounds x="200" y="78" width="100" height="80"/>
|
|
588
|
+
</bpmndi:BPMNShape>
|
|
589
|
+
<bpmndi:BPMNShape id="end_di" bpmnElement="end">
|
|
590
|
+
<omgdc:Bounds x="360" y="100" width="36" height="36"/>
|
|
591
|
+
</bpmndi:BPMNShape>
|
|
592
|
+
<bpmndi:BPMNEdge id="flow_1_di" bpmnElement="flow_1">
|
|
593
|
+
<omgdi:waypoint x="136" y="118"/>
|
|
594
|
+
<omgdi:waypoint x="200" y="118"/>
|
|
595
|
+
</bpmndi:BPMNEdge>
|
|
596
|
+
<bpmndi:BPMNEdge id="flow_2_di" bpmnElement="flow_2">
|
|
597
|
+
<omgdi:waypoint x="300" y="118"/>
|
|
598
|
+
<omgdi:waypoint x="360" y="118"/>
|
|
599
|
+
</bpmndi:BPMNEdge>
|
|
600
|
+
</bpmndi:BPMNPlane>
|
|
601
|
+
</bpmndi:BPMNDiagram>
|
|
602
|
+
</definitions>
|
|
603
|
+
....
|
|
604
|
+
|
|
605
|
+
==== Excalidraw
|
|
606
|
+
|
|
607
|
+
`[excalidraw]` renders an Excalidraw scene (the JSON a `.excalidraw` file, or
|
|
608
|
+
https://excalidraw.com[excalidraw.com]'s own "Save to..." export, contains). Unlike
|
|
609
|
+
`bpmn`, this type *does* need its own companion — the bundled `kroki-compose.yml`
|
|
610
|
+
includes an `excalidraw` service alongside `mermaid` for exactly that reason:
|
|
611
|
+
|
|
612
|
+
[,asciidoc]
|
|
613
|
+
----
|
|
614
|
+
[excalidraw]
|
|
615
|
+
....
|
|
616
|
+
{
|
|
617
|
+
"type": "excalidraw",
|
|
618
|
+
"version": 2,
|
|
619
|
+
"elements": [
|
|
620
|
+
{
|
|
621
|
+
"type": "rectangle",
|
|
622
|
+
"id": "rect1",
|
|
623
|
+
"x": 100,
|
|
624
|
+
"y": 100,
|
|
625
|
+
"width": 200,
|
|
626
|
+
"height": 100,
|
|
627
|
+
"strokeColor": "#1e1e1e",
|
|
628
|
+
"backgroundColor": "transparent",
|
|
629
|
+
"seed": 1
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
"type": "text",
|
|
633
|
+
"id": "text1",
|
|
634
|
+
"x": 130,
|
|
635
|
+
"y": 135,
|
|
636
|
+
"width": 140,
|
|
637
|
+
"height": 25,
|
|
638
|
+
"text": "Hello, Excalidraw",
|
|
639
|
+
"fontSize": 20,
|
|
640
|
+
"seed": 2
|
|
641
|
+
}
|
|
642
|
+
]
|
|
643
|
+
}
|
|
644
|
+
....
|
|
645
|
+
----
|
|
646
|
+
|
|
647
|
+
[excalidraw]
|
|
648
|
+
....
|
|
649
|
+
{
|
|
650
|
+
"type": "excalidraw",
|
|
651
|
+
"version": 2,
|
|
652
|
+
"elements": [
|
|
653
|
+
{
|
|
654
|
+
"type": "rectangle",
|
|
655
|
+
"id": "rect1",
|
|
656
|
+
"x": 100,
|
|
657
|
+
"y": 100,
|
|
658
|
+
"width": 200,
|
|
659
|
+
"height": 100,
|
|
660
|
+
"strokeColor": "#1e1e1e",
|
|
661
|
+
"backgroundColor": "transparent",
|
|
662
|
+
"seed": 1
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
"type": "text",
|
|
666
|
+
"id": "text1",
|
|
667
|
+
"x": 130,
|
|
668
|
+
"y": 135,
|
|
669
|
+
"width": 140,
|
|
670
|
+
"height": 25,
|
|
671
|
+
"text": "Hello, Excalidraw",
|
|
672
|
+
"fontSize": 20,
|
|
673
|
+
"seed": 2
|
|
674
|
+
}
|
|
675
|
+
]
|
|
676
|
+
}
|
|
677
|
+
....
|
|
678
|
+
|
|
679
|
+
=== Inline macros: `label:` and `mono:`
|
|
680
|
+
|
|
681
|
+
label:grey[Default] label:red[Blocked] label:orange[Pending] label:green[Stable]
|
|
682
|
+
label:blue[Info] label:purple[Beta] label:pink[New] label:teal[Docs] label:white[White]
|
|
683
|
+
|
|
684
|
+
`mono:` is plain monospaced text with no code-chip styling — for a table cell whose
|
|
685
|
+
entire content is a bare token (see `retry.max-attempts` above, which uses backtick code
|
|
686
|
+
instead; mono:[className] is the deliberate opt-out when a whole column of cells is
|
|
687
|
+
tokens and the chip would be noise).
|
|
688
|
+
|
|
689
|
+
=== Table and video sizing attributes
|
|
690
|
+
|
|
691
|
+
`table-width=` and `nowrap-cols=` are demonstrated in the table section above. The one
|
|
692
|
+
remaining sizing attribute, for a video block, is not rendered live on this page (it
|
|
693
|
+
would embed a real, unrelated third-party video) — the syntax is:
|
|
694
|
+
|
|
695
|
+
[,asciidoc]
|
|
696
|
+
----
|
|
697
|
+
video::VIDEO_ID[youtube,640,360]
|
|
698
|
+
----
|
|
699
|
+
|
|
700
|
+
`640,360` both caps the embed's width and locks its aspect ratio at any narrower
|
|
701
|
+
viewport; width alone caps the width and leaves the ratio at the 16:9 fallback.
|