@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.
Files changed (94) hide show
  1. package/build/bin.js +321 -0
  2. package/build/commands/build.js +22 -0
  3. package/build/commands/completion.js +69 -0
  4. package/build/commands/dev.js +67 -0
  5. package/build/commands/doctor.js +156 -0
  6. package/build/commands/eject.js +71 -0
  7. package/build/commands/new.js +512 -0
  8. package/build/commands/publish.js +111 -0
  9. package/build/commands/teardown.js +66 -0
  10. package/build/commands/upgrade.js +156 -0
  11. package/build/commands/version.js +60 -0
  12. package/build/lib/agents-md.js +67 -0
  13. package/build/lib/antora-log.js +36 -0
  14. package/build/lib/antora-yml.js +47 -0
  15. package/build/lib/args.js +26 -0
  16. package/build/lib/cli-context.js +17 -0
  17. package/build/lib/cli-info.js +20 -0
  18. package/build/lib/config-resolver.js +23 -0
  19. package/build/lib/copy-template.js +162 -0
  20. package/build/lib/debug-log.js +21 -0
  21. package/build/lib/detect-package-manager.js +79 -0
  22. package/build/lib/dev-server.js +337 -0
  23. package/build/lib/doctor-checks.js +240 -0
  24. package/build/lib/global-flags.js +31 -0
  25. package/build/lib/kroki-compose.js +54 -0
  26. package/build/lib/playbook-yml.js +90 -0
  27. package/build/lib/repo-root.js +21 -0
  28. package/build/lib/run-script.js +50 -0
  29. package/build/lib/theme.js +51 -0
  30. package/build/templates/agent-support/.claude/skills/docs-internals/SKILL.md +53 -0
  31. package/build/templates/agent-support/.claude/skills/docs-internals/reference/antora-extensions.md +54 -0
  32. package/build/templates/agent-support/.claude/skills/docs-internals/reference/naming.md +41 -0
  33. package/build/templates/agent-support/.claude/skills/docs-internals/reference/page-patterns.md +238 -0
  34. package/build/templates/agent-support/.claude/skills/docs-versioning.versioned/SKILL.md +37 -0
  35. package/build/templates/agent-support/.claude/skills/docs-versioning.versioned/reference/releasing.md +106 -0
  36. package/build/templates/agent-support/.claude/skills/documenting-your-repo/SKILL.md +55 -0
  37. package/build/templates/agent-support/.claude/skills/documenting-your-repo/reference/content-sourcing.md +55 -0
  38. package/build/templates/agent-support/.claude/skills/documenting-your-repo/reference/maintenance-loop.md +68 -0
  39. package/build/templates/agent-support/.claude/skills/documenting-your-repo/reference/structure-planning.md +102 -0
  40. package/build/templates/agent-support/.claude/skills/writing-docs-pages/SKILL.md +112 -0
  41. package/build/templates/agent-support/.claude/skills/writing-docs-pages/reference/docouture-blocks.md +170 -0
  42. package/build/templates/agent-support/.claude/skills/writing-docs-pages/reference/language-basics.md +402 -0
  43. package/build/templates/agent-support/.opencode/skills/docs-internals/SKILL.md +53 -0
  44. package/build/templates/agent-support/.opencode/skills/docs-internals/reference/antora-extensions.md +54 -0
  45. package/build/templates/agent-support/.opencode/skills/docs-internals/reference/naming.md +41 -0
  46. package/build/templates/agent-support/.opencode/skills/docs-internals/reference/page-patterns.md +238 -0
  47. package/build/templates/agent-support/.opencode/skills/docs-versioning.versioned/SKILL.md +37 -0
  48. package/build/templates/agent-support/.opencode/skills/docs-versioning.versioned/reference/releasing.md +106 -0
  49. package/build/templates/agent-support/.opencode/skills/documenting-your-repo/SKILL.md +55 -0
  50. package/build/templates/agent-support/.opencode/skills/documenting-your-repo/reference/content-sourcing.md +55 -0
  51. package/build/templates/agent-support/.opencode/skills/documenting-your-repo/reference/maintenance-loop.md +68 -0
  52. package/build/templates/agent-support/.opencode/skills/documenting-your-repo/reference/structure-planning.md +102 -0
  53. package/build/templates/agent-support/.opencode/skills/writing-docs-pages/SKILL.md +112 -0
  54. package/build/templates/agent-support/.opencode/skills/writing-docs-pages/reference/docouture-blocks.md +170 -0
  55. package/build/templates/agent-support/.opencode/skills/writing-docs-pages/reference/language-basics.md +402 -0
  56. package/build/templates/agent-support/AGENTS.md +72 -0
  57. package/build/templates/starter/antora-playbook.local.yml +99 -0
  58. package/build/templates/starter/antora-playbook.versioned.yml +167 -0
  59. package/build/templates/starter/antora-playbook.yml +189 -0
  60. package/build/templates/starter/gitignore +3 -0
  61. package/build/templates/starter/package.json +37 -0
  62. package/build/templates/starter/scripts/check-links.mjs +178 -0
  63. package/build/templates/starter/src/antora.yml +85 -0
  64. package/build/templates/starter/src/modules/ROOT/images/card-placeholder.png +0 -0
  65. package/build/templates/starter/src/modules/ROOT/images/feature-placeholder-dark.png +0 -0
  66. package/build/templates/starter/src/modules/ROOT/images/feature-placeholder.png +0 -0
  67. package/build/templates/starter/src/modules/ROOT/images/hero-placeholder.png +0 -0
  68. package/build/templates/starter/src/modules/ROOT/pages/index.adoc +124 -0
  69. package/build/templates/starter/src/modules/main/nav.adoc +19 -0
  70. package/build/templates/starter/src/modules/main/pages/app.adoc +5 -0
  71. package/build/templates/starter/src/modules/main/pages/architecture.adoc +6 -0
  72. package/build/templates/starter/src/modules/main/pages/changelog/index.adoc +9 -0
  73. package/build/templates/starter/src/modules/main/pages/components.adoc +701 -0
  74. package/build/templates/starter/src/modules/main/pages/contributing.adoc +6 -0
  75. package/build/templates/starter/src/modules/main/pages/getting-started.adoc +169 -0
  76. package/build/templates/starter/src/modules/main/pages/glossary.adoc +8 -0
  77. package/build/templates/starter/src/modules/main/pages/index.adoc +9 -0
  78. package/build/templates/starter/src/modules/main/pages/prerequisites.adoc +55 -0
  79. package/build/templates/starter/src/modules/main/pages/quickstart.adoc +21 -0
  80. package/build/templates/starter/src/modules/main/pages/release-notes/index.adoc +9 -0
  81. package/build/templates/starter/src/modules/main/pages/requirements.adoc +8 -0
  82. package/build/templates/starter/src/modules/main/pages/roadmap.adoc +4 -0
  83. package/build/templates/starter/src/modules/main/pages/structure.adoc +5 -0
  84. package/build/templates/starter/src/release-version.versioned +1 -0
  85. package/build/templates/starter/supplemental-ui/favicon.ico +0 -0
  86. package/build/templates/starter/supplemental-ui/product-logo-dark.png +0 -0
  87. package/build/templates/starter/supplemental-ui/product-logo.png +0 -0
  88. package/build/templates/workflows/docouture-kroki-cache-warm.yml +101 -0
  89. package/build/templates/workflows/docouture-pr-verify.yml +120 -0
  90. package/build/templates/workflows/docouture-publish-prerelease.yml +122 -0
  91. package/build/templates/workflows/docouture-publish.yml +138 -0
  92. package/build/templates/workflows/docouture-release-preview.yml +198 -0
  93. package/build/templates/workflows/docouture-release.yml +414 -0
  94. package/package.json +38 -0
@@ -0,0 +1,402 @@
1
+ # AsciiDoc language basics
2
+
3
+ Ordered by how often it comes up, not by upstream nav order. Antora-specific behaviour is
4
+ called out inline; everything else is plain AsciiDoc as Asciidoctor implements it.
5
+
6
+ Upstream base URL for every link below: `https://docs.asciidoctor.org/asciidoc/latest/`
7
+
8
+ ## Document structure
9
+
10
+ A page is a header (optional), then blocks. The header is everything above the first
11
+ blank line.
12
+
13
+ ```adoc
14
+ = Page Title
15
+ :description: Shown in the meta description and in search results.
16
+ :page-tags: one, two
17
+
18
+ Preamble paragraph — content before the first section title.
19
+
20
+ == First Section
21
+
22
+ Body.
23
+
24
+ === Nested Section
25
+ ```
26
+
27
+ - **One level-0 title per page.** `=` is the document title; `==` is the first real
28
+ section. A second `=` is an error in `doctype: article` (the default).
29
+ - Section levels must not skip: `==` then `====` is a warning, and a warning fails the
30
+ build here.
31
+ - Attribute entries (`:name: value`) in the header apply to the whole page. Placed in the
32
+ body they apply from that point on.
33
+ - `page-*` attributes are Antora's convention: they are lifted onto the UI model and are
34
+ available to templates rather than to the content.
35
+
36
+ `document-structure/`, `document/header/`, `sections/titles-and-levels/`
37
+
38
+ ## Blocks
39
+
40
+ A block is delimited by four or more repeated characters, or implied by a blank line
41
+ (paragraph).
42
+
43
+ | delimiter | block |
44
+ | --------- | --------------------------------------- |
45
+ | `----` | listing / source |
46
+ | `....` | literal |
47
+ | `====` | example (and, with a style, admonition) |
48
+ | `****` | sidebar |
49
+ | `____` | quote |
50
+ | `--` | open (exactly two hyphens) |
51
+ | `\|===` | table |
52
+ | `++++` | passthrough |
53
+ | `////` | comment |
54
+
55
+ Metadata sits directly above the delimiter, no blank line between:
56
+
57
+ ```adoc
58
+ .A block title
59
+ [#custom-id.role-one.role-two%option,attr=value]
60
+ ----
61
+ content
62
+ ----
63
+ ```
64
+
65
+ - `.Title` — block title.
66
+ - `#id` — the ID, in the attribute list shorthand.
67
+ - `.role` — a CSS class. Repeatable.
68
+ - `%option` — an option, e.g. `%collapsible`, `%header`, `%autowidth`.
69
+ - The first positional attribute is the **block style**, which can make one delimiter
70
+ behave as another (`[quote]` on `====`, `[source]` on `----`). This is _block
71
+ masquerading_.
72
+
73
+ `blocks/`, `blocks/delimited/`, `attributes/element-attributes/`, `blocks/masquerading/`
74
+
75
+ ## Text formatting
76
+
77
+ | markup | result | note |
78
+ | ------------------------------- | ----------------------- | ---------------------------------- |
79
+ | `*bold*` / `**bold**` | bold | double form required mid-word |
80
+ | `_italic_` / `__italic__` | italic | same |
81
+ | `` `mono` `` | monospace | subs still apply inside |
82
+ | `` `+literal+` `` | monospace, no subs | use for anything with `{}` or `<>` |
83
+ | `#highlight#` / `##highlight##` | mark | |
84
+ | `[.role]#text#` | span with a class | the general escape hatch |
85
+ | `~sub~` / `^sup^` | subscript / superscript | |
86
+
87
+ The single-mark ("constrained") form only applies when the marks sit at a word boundary.
88
+ `hard*coded*text` is literal asterisks; `hard**coded**text` is bold. This is the single
89
+ most common formatting surprise.
90
+
91
+ `text/`, `text/troubleshoot-unconstrained-formatting/`
92
+
93
+ ## Lists
94
+
95
+ ```adoc
96
+ * first
97
+ * second
98
+ ** nested
99
+ +
100
+ Attached paragraph — the `+` continuation binds it to the item above.
101
+
102
+ . ordered
103
+ . ordered
104
+
105
+ term:: definition
106
+ another term:: definition
107
+
108
+ * [ ] unchecked task
109
+ * [x] checked task
110
+ ```
111
+
112
+ - Nesting is marker repetition (`*`, `**`, `***`), not indentation.
113
+ - A blank line alone does not end a list; adjacent non-list content does. Two adjacent
114
+ lists that should stay separate need `//-` (an empty comment line) between them.
115
+ - Anything other than a plain paragraph attached to an item needs `+` on its own line
116
+ before it — including nested blocks, source blocks and admonitions.
117
+
118
+ `lists/unordered/`, `lists/ordered/`, `lists/description/`, `lists/continuation/`,
119
+ `lists/checklist/`, `lists/separating/`
120
+
121
+ ## Links and cross references
122
+
123
+ ```adoc
124
+ https://example.com[Link text]
125
+ https://example.com[Link text^] open in a new tab
126
+ link:https://example.com[Text] explicit macro; needed when the URL is not bare
127
+ mailto:a@example.com[Mail us]
128
+
129
+ xref:page.adoc[Text] Antora resource ID — see writing-docs-pages SKILL.md
130
+ xref:page.adoc#section-id[Text]
131
+ xref:#local-section[Text] same page
132
+ <<local-section,Text>> same page, alternate form
133
+ ```
134
+
135
+ - Empty xref text (`xref:page.adoc[]`) renders the target page's title. Prefer it — it
136
+ stays correct when the title changes.
137
+ - A URL containing `[`, `]` or a trailing `.` needs the `link:` macro or attribute
138
+ wrapping.
139
+ - Antora validates every xref. An unresolved one fails the build.
140
+
141
+ `macros/links/`, `macros/xref/`, `macros/inter-document-xref/`
142
+
143
+ ## Images and icons
144
+
145
+ ```adoc
146
+ image::name.png[Alt text,640,480] block image
147
+ image:name.png[Alt text,24,24] inline image (single colon)
148
+ image::name.png[Alt,link=https://example.com]
149
+ icon:check[] font icon — icons=font is set
150
+ kbd:[Ctrl+C] requires experimental (it is set)
151
+ btn:[Save]
152
+ menu:File[Save As]
153
+ ```
154
+
155
+ Antora resolves `image::name.png[]` against the module's `images/` directory. Do not
156
+ write `../images/name.png` and do not set `:imagesdir:` — Antora manages it.
157
+
158
+ `macros/images/`, `macros/icons/`, `macros/keyboard-macro/`, `macros/ui-macros/`
159
+
160
+ ## Source blocks
161
+
162
+ ```adoc
163
+ [source,typescript]
164
+ ----
165
+ const answer = 42
166
+ ----
167
+
168
+ [source,json,highlight=2..3]
169
+ ----
170
+ { "a": 1 }
171
+ ----
172
+ ```
173
+
174
+ - `source-highlighter=highlight.js` is Antora's default and is in force here. The
175
+ language token must be one highlight.js knows.
176
+ - `[,typescript]` (empty first positional) is shorthand for `[source,typescript]`.
177
+ - Callouts mark lines with `<1>` and are explained in a following colon list:
178
+
179
+ ```adoc
180
+ [source,js]
181
+ ----
182
+ const x = 1 // <1>
183
+ ----
184
+ <1> Explanation.
185
+ ```
186
+
187
+ - Attribute references are **not** substituted inside a source block unless the block
188
+ carries `subs=attributes+`.
189
+
190
+ `verbatim/source-blocks/`, `verbatim/callouts/`, `verbatim/highlight-lines/`
191
+
192
+ ## Admonitions
193
+
194
+ ```adoc
195
+ NOTE: One-line form.
196
+
197
+ [WARNING]
198
+ ====
199
+ Multi-line form. Any blocks can go inside.
200
+ ====
201
+ ```
202
+
203
+ Five types only: `NOTE`, `TIP`, `IMPORTANT`, `WARNING`, `CAUTION`. A custom type needs a
204
+ role plus CSS.
205
+
206
+ `blocks/admonitions/`
207
+
208
+ ## Tables
209
+
210
+ ```adoc
211
+ .Optional title
212
+ [cols="1,2,1",options="header",%autowidth]
213
+ |===
214
+ |Column A |Column B |Column C
215
+
216
+ |cell
217
+ |cell
218
+ |cell
219
+ |===
220
+ ```
221
+
222
+ - `cols` takes proportional widths (`1,2,1`), percentages (`25%,50%,25%`), or a repeat
223
+ (`3*` = three equal columns).
224
+ - A column or cell specifier prefixes the width: alignment `<` `^` `>` (horizontal),
225
+ `.<` `.^` `.>` (vertical), and a style suffix:
226
+
227
+ | suffix | cell content treated as |
228
+ | ------ | ------------------------------------------------ |
229
+ | `a` | AsciiDoc — the only way to nest blocks in a cell |
230
+ | `l` | literal |
231
+ | `m` | monospace |
232
+ | `h` | header |
233
+ | `s` | strong |
234
+ | `d` | default (prose) |
235
+
236
+ - Spans: `2+|` spans two columns, `.3+|` three rows, `2.3+|` both. `3*|` duplicates a
237
+ cell across three columns.
238
+ - A cell containing a `|` needs it escaped as `\|`.
239
+
240
+ `tables/build-a-basic-table/`, `tables/format-column-content/`, `tables/span-cells/`,
241
+ `tables/table-ref/`
242
+
243
+ ## Includes
244
+
245
+ ```adoc
246
+ include::partial$intro.adoc[]
247
+ include::example$config.json[]
248
+ include::partial$file.adoc[tag=setup]
249
+ include::example$app.ts[lines=10..20]
250
+ include::partial$chapter.adoc[leveloffset=+1]
251
+ include::example$snippet.js[indent=0]
252
+ ```
253
+
254
+ Tagged regions are marked in the _included_ file with comments in that file's own comment
255
+ syntax:
256
+
257
+ ```js
258
+ // tag::setup[]
259
+ const app = createApp()
260
+ // end::setup[]
261
+ ```
262
+
263
+ - `leveloffset=+1` demotes every section title in the included file — required when
264
+ including a file that has its own `=` title.
265
+ - `indent=0` normalises leading whitespace, so a tagged region extracted from indented
266
+ code renders flush left.
267
+ - Antora restricts targets to the resource families. `include::../other.adoc[]` and
268
+ `include::https://…[]` do not work.
269
+
270
+ `directives/include/`, `directives/include-tagged-regions/`,
271
+ `directives/include-lines/`, `directives/include-with-leveloffset/`
272
+
273
+ ## Conditionals
274
+
275
+ ```adoc
276
+ ifdef::experimental[]
277
+ Shown when the attribute is set.
278
+ endif::[]
279
+
280
+ ifndef::backend-html5[]
281
+ Shown when it is not set.
282
+ endif::[]
283
+
284
+ ifeval::[{sectnumlevels} > 2]
285
+ Shown when the expression is true.
286
+ endif::[]
287
+ ```
288
+
289
+ `ifdef::attr-one,attr-two[]` is OR; `ifdef::attr-one+attr-two[]` is AND. The single-line
290
+ form `ifdef::attr[content]` exists for one line of content.
291
+
292
+ `directives/conditionals/`, `directives/ifdef-ifndef/`, `directives/ifeval/`
293
+
294
+ ## Substitutions
295
+
296
+ Applied to normal blocks in this fixed order:
297
+
298
+ 1. `specialchars` — `<`, `>`, `&` escaped
299
+ 2. `quotes` — the formatting marks above
300
+ 3. `attributes` — `{name}` references resolved
301
+ 4. `replacements` — `(C)`, `--`, `...` and friends
302
+ 5. `macros` — link, image, icon, xref
303
+ 6. `post_replacements` — the `+` line break
304
+
305
+ Verbatim blocks (`----`, `....`) get `specialchars` and `callouts` only. Passthrough gets
306
+ nothing.
307
+
308
+ Override per block or per inline span:
309
+
310
+ ```adoc
311
+ [subs="attributes+"] incremental — add to the defaults
312
+ [subs="+macros,-callouts"] add one, remove another
313
+ [subs="verbatim,quotes"] absolute — replaces the defaults entirely
314
+ ```
315
+
316
+ Escape a single substitution with a leading backslash (`\{attr}`, `\*not bold*`), or use
317
+ an inline passthrough:
318
+
319
+ ```adoc
320
+ +literal text+ no subs
321
+ pass:[<b>raw</b>] no subs, raw output
322
+ pass:attributes[{version}] only the listed subs
323
+ ```
324
+
325
+ `subs/`, `subs/apply-subs-to-blocks/`, `subs/prevent/`, `pass/`
326
+
327
+ ## Attributes
328
+
329
+ ```adoc
330
+ :name: value
331
+ :name!: unset
332
+ :!name: unset, alternate form
333
+ :name: {other} suffix references resolve at definition time
334
+ ```
335
+
336
+ Precedence, highest first: CLI/API → playbook `asciidoc.attributes` → `antora.yml` →
337
+ page header. A playbook attribute ending in `@` becomes _soft-set_ and can be overridden
338
+ by a page; without `@` it cannot.
339
+
340
+ `attributes/document-attributes/`, `attributes/assignment-precedence/`,
341
+ `attributes/document-attributes-ref/`
342
+
343
+ ## Other blocks worth knowing
344
+
345
+ ```adoc
346
+ [%collapsible]
347
+ ====
348
+ Rendered as a <details> element.
349
+ ====
350
+
351
+ [quote,Author,Source]
352
+ ____
353
+ Quotation.
354
+ ____
355
+
356
+ [sidebar] or ****
357
+ ****
358
+ Aside content.
359
+ ****
360
+
361
+ --
362
+ An open block — groups content with no semantics of its own. The usual way to
363
+ attach several blocks to one list item.
364
+ --
365
+
366
+ toc::[] macro TOC; needs :toc: in the header
367
+ ```
368
+
369
+ `blocks/collapsible/`, `blocks/blockquotes/`, `blocks/sidebars/`, `blocks/open-blocks/`,
370
+ `toc/`
371
+
372
+ ## URL index — the long tail
373
+
374
+ Not summarised above; fetch when needed.
375
+
376
+ | topic | page |
377
+ | ------------------------------------------------------------- | --------------------------------------- |
378
+ | Syntax quick reference | `syntax-quick-reference/` |
379
+ | Document attributes reference (every built-in) | `attributes/document-attributes-ref/` |
380
+ | Character replacements (`(C)`, `->`, …) | `attributes/character-replacement-ref/` |
381
+ | Text span and built-in roles | `text/text-span-built-in-roles/` |
382
+ | Quotation marks and apostrophes | `text/quotation-marks-and-apostrophes/` |
383
+ | Footnotes | `macros/footnote/` |
384
+ | Audio and video | `macros/audio-and-video/` |
385
+ | SVG images | `macros/image-svg/` |
386
+ | Image sizing / positioning reference | `macros/image-ref/` |
387
+ | STEM (equations, formulas) | `stem/` |
388
+ | Docinfo files | `docinfo/` |
389
+ | Book parts, chapters, appendix, glossary, bibliography, index | `sections/styles/` |
390
+ | Special section titles and numbering | `sections/special-section-titles/` |
391
+ | Verses | `blocks/verses/` |
392
+ | CSV / TSV / DSV table data | `tables/data-format/` |
393
+ | Nested tables | `tables/nested/` |
394
+ | Hard line breaks | `blocks/hard-line-breaks/` |
395
+ | Discrete headings | `blocks/discrete-headings/` |
396
+ | Preamble and lead style | `blocks/preamble-and-lead/` |
397
+ | AsciiDoc vs Markdown | `asciidoc-vs-markdown/` |
398
+ | Glossary of terms | `glossary/` |
399
+ | FAQ | `faq/` |
400
+
401
+ Antora's own layer — resource IDs, families, nav, page attributes, the content catalog —
402
+ is documented separately at `https://docs.antora.org/antora/latest/`.
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: docs-internals
3
+ description: "How this Antora documentation site is put together: the playbook, the docs/antora.yml component descriptor, the four names that must agree, mono-module vs. multi-module layout, and the home-page vs. content-page patterns. USE WHEN adding a page or module, renaming the site/component, choosing between a single-module and multi-module layout, building a landing/home page, or diagnosing a site that builds with zero pages or fails with 'start page not found'. EXAMPLES: 'add a new module', 'rename this docs site', 'build a marketing home page', 'the site builds but has no pages', 'start page not found', 'should this be one module or several'."
4
+ ---
5
+
6
+ # Site structure
7
+
8
+ This site was scaffolded by `docouture new` (`@inditextech/docouture-cli`). This skill covers the
9
+ pieces that make it hang together — where each name is set, how a page becomes reachable,
10
+ and the two page patterns (home vs. content) worth copying rather than reinventing.
11
+
12
+ - `reference/naming.md` — the four names that must agree, and how to fix them when they
13
+ don't (`docouture doctor` checks this automatically).
14
+ - `reference/page-patterns.md` — the home-page block structure and the recurring
15
+ content-page shapes, plus mono-module vs. multi-module layout.
16
+ - `reference/antora-extensions.md` — what `@inditextech/docouture-antora-extensions` (a
17
+ different kind of extension from the authoring blocks in `writing-docs-pages`) provides:
18
+ the module switcher, site footer, search index and `llms.txt` generation.
19
+
20
+ For AsciiDoc authoring itself — xrefs, admonitions, code blocks, this site's custom
21
+ blocks — see the `writing-docs-pages` skill.
22
+
23
+ ## The moving pieces
24
+
25
+ ```
26
+ docs/
27
+ antora-playbook.yml site title, content source, UI bundle, asciidoc/antora extensions
28
+ antora-playbook.local.yml same shape, but content.sources[] is just `branches: HEAD` —
29
+ what `docouture dev` and PR verification build against, since a
30
+ PR/feature-branch checkout doesn't have `main` or a release tag
31
+ package.json name, devDependencies (docouture-cli, ui-bundle, the two extension
32
+ packages), the `build`/`dev` scripts
33
+ src/
34
+ antora.yml component descriptor: name, title, version, nav
35
+ modules/<module>/nav.adoc navigation tree, one per module
36
+ ```
37
+
38
+ The whole starter template — `package.json`, both playbooks, the nested `src/` — was
39
+ copied under this repository's own `docs/`, so `antora-playbook.yml` lives at
40
+ `<repo-root>/docs/antora-playbook.yml` and the component descriptor ends up one level
41
+ further down, at `docs/src/antora.yml`. That's why `antora-playbook.yml`'s
42
+ `content.sources[0]` reads `url: ..` (this repo's root, one level up from `docs/`) and
43
+ `start_path: docs/src`.
44
+
45
+ ## Versioning
46
+
47
+ `docs/antora.yml`'s `version`/`prerelease` fields are identical on `main` regardless of
48
+ which versioning mode this site uses (`version: prerelease`, `prerelease: true`) — what
49
+ differs is only which git refs `antora-playbook.yml`'s `content.sources[0]` aggregates
50
+ from (`tags: ['stable']` vs. `tags: ['v*']`). If this site was scaffolded with
51
+ `--mode versioned`, see the `docs-versioning` skill for cutting a release; a
52
+ **standalone**-mode site (the default) has no separate skill for this — `docouture doctor`
53
+ and the `docouture-release.yml` workflow are all that's needed.
@@ -0,0 +1,54 @@
1
+ # @inditextech/docouture-antora-extensions
2
+
3
+ Registered under `antora-playbook.yml`'s **`antora.extensions`** key — a different key,
4
+ and a different kind of extension, from `writing-docs-pages`' `asciidoc.extensions`
5
+ (`@inditextech/docouture-asciidoc-extensions`). This one hooks Antora's own site-generation
6
+ pipeline rather than the AsciiDoc processor; listing either package under the other's key
7
+ makes Antora log a warning and skip it.
8
+
9
+ One package require registers five sub-extensions together — they can't be enabled
10
+ individually:
11
+
12
+ | sub-extension | reads | does |
13
+ | --------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
14
+ | module switcher | `nav_modules:` in `docs/src/antora.yml` | stamps each nav tree with its module/title/description/icon, so the UI can show one module's nav at a time with a switcher — see `reference/page-patterns.md`'s "Mono-module vs. multi-module" section. A no-op until `nav_modules:` is authored |
15
+ | site footer | `footer:` in `docs/src/antora.yml` | resolves a structured `footer: groups: […]` list of link groups and attaches it to the component version, for the UI's footer partial. A no-op until `footer:` is authored |
16
+ | search index | (nothing authored) | builds a full-text search index at build time, published per component version. **This is what the UI bundle's own search dialog reads** — without this extension registered, the search UI renders but has nothing to search |
17
+ | `llms.txt` generation | `llms:` in `docs/src/antora.yml` (optional `summary`/`exclude`) | generates `llms.txt` and `llms-full.txt` at the site root — a Markdown index and full dump, meant for LLM ingestion (see `https://llmstxt.org`), so an AI agent (or another tool) can read the site without scraping rendered HTML |
18
+ | Shiki prewarm | `asciidoc.attributes.source-highlighter` in `antora-playbook.yml` | pre-builds the Shiki syntax highlighter once, up front. Only useful if `source-highlighter: shiki` is actually set — this site keeps Antora's default `highlight.js` instead, so this sub-extension runs unconditionally but has nothing to prewarm for. Harmless, just a small unused build-time cost |
19
+
20
+ ## Authoring the optional keys
21
+
22
+ All three authored keys (`nav_modules`, `footer`, `llms`) live in `docs/src/antora.yml`,
23
+ not the playbook — `site.keys` there is declared as a flat primitive map and can't carry
24
+ a nested list, so the component descriptor is the one place a nested structure can be
25
+ authored:
26
+
27
+ ```yaml
28
+ # docs/src/antora.yml
29
+ nav_modules:
30
+ - module: framework
31
+ title: Framework
32
+ description: One-line description.
33
+ icon: design/grid-outlined
34
+
35
+ footer:
36
+ groups:
37
+ - title: Resources
38
+ links:
39
+ - text: Home
40
+ url: ROOT:index.adoc
41
+ - text: Repository
42
+ url: https://github.com/example/example
43
+
44
+ llms:
45
+ summary: >-
46
+ One or two sentences describing what this site documents — becomes the
47
+ blockquote under the site title in the generated llms.txt.
48
+ # exclude:
49
+ # - module:some-internal-page.adoc
50
+ ```
51
+
52
+ `url`/`links[].url` values are either a page ID (the same string `xref:...[]` accepts) or
53
+ a literal URL — a page ID that resolves to nothing is dropped with a warning rather than
54
+ rendered dead.
@@ -0,0 +1,41 @@
1
+ # The four names that must agree
2
+
3
+ Four independent files each carry a name that has to match another one, or the site
4
+ builds to zero pages, or fails outright with "start page not found". `docouture doctor` checks
5
+ every pair automatically — run it after any rename.
6
+
7
+ | name | set in | must match |
8
+ | -------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
9
+ | component name | `docs/src/antora.yml` → `name` | the `<component>::` prefix of the playbook's `site.start_page` |
10
+ | start page | `antora-playbook.yml` → `site.start_page` | a real file under `modules/ROOT/pages/` (or whichever module it names) |
11
+ | content path | `antora-playbook.yml` → `content.sources[0].start_path` | where `docs/src/antora.yml` actually is, repo-root relative — `docs/src` for a site scaffolded as-is |
12
+ | package name | `docs/package.json` → `name` | no hard requirement on its own, but conventionally matches the component name — this is what `docouture new <name>` sets both to initially |
13
+
14
+ ## Why each one matters
15
+
16
+ - **Component name vs. start page.** `site.start_page: my-site::index.adoc` names a
17
+ component (`my-site`) and a page (`index.adoc`) inside it. If `docs/src/antora.yml`'s
18
+ own `name:` says something else, Antora has no component by that name to serve the
19
+ start page from — the whole site 404s at `/`.
20
+ - **Start page vs. an actual file.** `site.start_page` must point at a page that exists
21
+ under that component's `pages/` tree (respecting the module, if the reference names
22
+ one: `my-site:some-module:index.adoc`). A typo here is "start page not found" at build
23
+ time, not a runtime 404.
24
+ - **Content path vs. where the descriptor really is.** `content.sources[0].start_path` is
25
+ repo-root relative. Move `docs/src/antora.yml` (or rename the outer `docs/` directory)
26
+ without updating `start_path` and Antora aggregates zero pages — no error, just an
27
+ empty site, because the path it looked in wasn't a component root at all.
28
+ - **Package name.** Not load-bearing for Antora itself, but drift here is a strong signal
29
+ something else drifted too (a manual rename that missed a file) — `docouture doctor` flags
30
+ it for that reason.
31
+
32
+ ## Fixing a drift
33
+
34
+ Renaming the site after scaffolding means touching three of the four in lockstep:
35
+
36
+ 1. `docs/src/antora.yml` → `name:`
37
+ 2. `antora-playbook.yml` → `site.start_page`'s component prefix
38
+ 3. `docs/package.json` → `name`
39
+
40
+ `content.sources[0].start_path` only needs touching if the _directory_ moved, not if just
41
+ the component's `name:` changed.