@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,112 @@
1
+ ---
2
+ name: writing-docs-pages
3
+ description: "How to author AsciiDoc content in this Antora documentation site — the content tree, xref: references, nav.adoc, admonitions, code blocks, and this site's own custom blocks (tabs, cards, accordion, feature-tabs, cta, label:/mono: macros). USE WHEN writing or editing a .adoc page, adding a page to the nav, fixing a broken xref, or reaching for a block like tabs/cards/accordion. EXAMPLES: 'add a page', 'my xref doesn't resolve', 'the build fails on a warning', 'add tabs for pnpm/npm/yarn commands', 'group these FAQ items', 'add a card grid'."
4
+ ---
5
+
6
+ # Writing docs pages
7
+
8
+ Every page here is AsciiDoc, parsed by **Asciidoctor** and orchestrated by **Antora**.
9
+ Antora restricts and reinterprets parts of the language (includes, xrefs, image paths);
10
+ where this skill and the upstream Asciidoctor docs differ, follow this skill.
11
+
12
+ - `reference/language-basics.md` — the AsciiDoc language itself: document structure,
13
+ blocks, text formatting, lists, links/xrefs, images, source blocks, admonitions, tables,
14
+ includes, conditionals, substitutions, attributes — plus a URL index into
15
+ `https://docs.asciidoctor.org/asciidoc/latest/` for anything not covered.
16
+ - `reference/docouture-blocks.md` — this site's own custom blocks, registered via
17
+ `@inditextech/docouture-asciidoc-extensions` (see `antora-playbook.yml`'s
18
+ `asciidoc.extensions`): `[tabs]`, `[cards]`, `[accordion]`, `[feature-tabs]`, `[cta]`,
19
+ `label:`/`mono:` inline macros, and a few table/video sizing attributes.
20
+
21
+ For the home page vs. content page patterns, mono- vs. multi-module sites, and the
22
+ playbook/component-descriptor mechanics, see the `docs-internals` skill.
23
+
24
+ ## Where content lives
25
+
26
+ ```
27
+ docs/src/
28
+ antora.yml component descriptor: name, title, version, nav
29
+ modules/
30
+ ROOT/ the default module; its name is omitted from resource IDs
31
+ nav.adoc the navigation tree for this module
32
+ pages/*.adoc one page per file — these become site URLs
33
+ ```
34
+
35
+ Only `pages/` exists in a freshly scaffolded site. The other family directories are
36
+ created when first needed, with these exact names — Antora keys off them and ignores
37
+ anything else:
38
+
39
+ | directory | family | referenced as |
40
+ | -------------- | ------------- | ------------------------------ |
41
+ | `pages/` | `page$` | `xref:name.adoc[]` |
42
+ | `partials/` | `partial$` | `include::partial$name.adoc[]` |
43
+ | `examples/` | `example$` | `include::example$name.json[]` |
44
+ | `images/` | `image$` | `image::name.png[]` |
45
+ | `attachments/` | `attachment$` | `xref:attachment$file.pdf[]` |
46
+
47
+ ## Resource IDs
48
+
49
+ Antora addresses content by resource ID, not by relative path:
50
+
51
+ ```
52
+ version@component:module:family$relative/path.adoc#fragment
53
+ ```
54
+
55
+ Everything left of the filename is optional and defaults to the current page's context.
56
+ Inside the same module:
57
+
58
+ | reference | means |
59
+ | -------------------------------- | ---------------------------------------------------------------------------- |
60
+ | `xref:index.adoc[Home]` | a page in the same module |
61
+ | `xref:guide/setup.adoc[]` | a page in a subdirectory of `pages/` — empty text uses the target's title |
62
+ | `xref:other-module:index.adoc[]` | a page in another module — only in a multi-module site, see `docs-internals` |
63
+ | `xref:index.adoc#install[]` | a fragment on another page |
64
+ | `include::partial$intro.adoc[]` | a partial from the same module |
65
+
66
+ `../` path traversal between pages is not how this works — a page one directory deep
67
+ still addresses its sibling as `xref:guide/other.adoc[]`, module-relative, never
68
+ file-relative.
69
+
70
+ ## Where a change goes
71
+
72
+ | you want to | do |
73
+ | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- |
74
+ | add a page | create `docs/src/modules/<module>/pages/name.adoc` **and** add an `xref:` to that module's `nav.adoc` |
75
+ | add a section to the nav | edit `nav.adoc` — nesting is list depth (`*`, `**`, `***`); a bare, unlinked list item can group xrefs under a heading with no page of its own |
76
+ | reuse a chunk of prose | `docs/src/modules/<module>/partials/name.adoc`, included as `partial$name.adoc` |
77
+ | add an image | `docs/src/modules/<module>/images/name.png`, referenced as `image::name.png[Alt]` |
78
+ | set a site-wide attribute | `asciidoc.attributes` in `antora-playbook.yml` |
79
+ | set a component-wide attribute | `asciidoc.attributes` in `docs/src/antora.yml` |
80
+ | set a page-scoped attribute | an attribute entry in the page header, above the first blank line |
81
+
82
+ ## Constraints that fail silently
83
+
84
+ - **A warning is a build failure.** `antora-playbook.yml` sets
85
+ `runtime.log.failure_level: warn`. A broken xref, a missing include target, an
86
+ undefined attribute reference or a bad image path exits non-zero.
87
+ - **A page missing from `nav.adoc` still builds.** It publishes at its URL, renders with
88
+ an empty navigation context and is reachable only by direct link. Nothing warns.
89
+ - **`include::` cannot read arbitrary paths.** Antora installs its own include processor
90
+ that resolves targets against the content catalog, so only the family forms
91
+ (`partial$`, `example$`, page IDs) work. A filesystem path fails at build time.
92
+ - **Attribute references are not substituted inside verbatim blocks.** `{version}`
93
+ inside `----`/`....` renders literally unless the block carries `subs=attributes+`.
94
+ - **Unconstrained formatting needs doubled marks.** `**bold**` mid-word, `__italic__`
95
+ mid-word. The single-mark form adjacent to a word character is not formatting at all.
96
+ - **A cross-module xref only resolves inside a multi-module site**, and only once both
97
+ modules are listed under `docs/src/antora.yml`'s `nav:` — see `docs-internals`.
98
+
99
+ ## Page attributes the UI reads
100
+
101
+ | attribute | effect |
102
+ | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
103
+ | `description` | hero excerpt (below the title) AND `<meta name="description">` |
104
+ | `page-tags` | comma-separated; one label pill each in the hero |
105
+ | `page-action` / `page-action-url` | primary hero button — renders only when BOTH are set |
106
+ | `page-action-secondary` / `page-action-secondary-url` | secondary hero button, same rule |
107
+ | `page-hero-image` / `page-hero-image-alt` | hero illustration |
108
+ | `page-nav-module` | which module's nav tree the side menu shows for this page — set on `ROOT`'s own landing page in a multi-module site, since `ROOT` has no nav of its own |
109
+ | `page-layout: home` | the marketing home-page layout — see `docs-internals`'s page-patterns reference |
110
+ | `page-role: -hero` | suppresses the hero entirely |
111
+ | `page-role: -toc` | suppresses the right-hand table of contents |
112
+ | `page-pagination` | enables the previous/next footer links |
@@ -0,0 +1,170 @@
1
+ # This site's custom blocks
2
+
3
+ Registered by `@inditextech/docouture-asciidoc-extensions`, listed under
4
+ `antora-playbook.yml`'s `asciidoc.extensions`. Everything below is authored content with
5
+ no plain-AsciiDoc equivalent — the extension only emits markup, all styling comes from
6
+ the UI bundle's CSS. Every block here degrades to plain, readable HTML with JavaScript
7
+ off (sequential sections for tabs, `<details>` for accordions, real `<a href>`s).
8
+
9
+ ## Tabs
10
+
11
+ A switcher for equivalent alternatives — package-manager commands, config formats, etc.
12
+
13
+ ```adoc
14
+ [tabs]
15
+ --
16
+ [tab,label="pnpm"]
17
+ ****
18
+ [source,bash]
19
+ ----
20
+ pnpm add some-package
21
+ ----
22
+ ****
23
+
24
+ [tab,label="npm"]
25
+ ****
26
+ [source,bash]
27
+ ----
28
+ npm install some-package
29
+ ----
30
+ ****
31
+ --
32
+ ```
33
+
34
+ `[tabs]` is an open block (`--`); each `[tab,label="…"]` child is its own sidebar block
35
+ (`****`), never an example block (`====`) — this lets a tab hold anything, including a
36
+ titled source block or another nested block, without a delimiter-nesting trap.
37
+
38
+ ## Cards
39
+
40
+ A grid of entry-point cards — landing "Get started" rows, or a content page pointing at
41
+ related pages.
42
+
43
+ ```adoc
44
+ [cards,type=image-square,columns="1 s:2 m:4",width=container]
45
+ ====
46
+ [card,subheader="Category"]
47
+ .xref:module:page.adoc[Card title]
48
+ --
49
+ image::card-image.png["Alt text"]
50
+
51
+ Card description.
52
+ --
53
+
54
+ [card]
55
+ .xref:module:other.adoc[No-image card]
56
+ A card with just a title and description — no image, no open block needed.
57
+ ====
58
+ ```
59
+
60
+ - `type`: `no-image` (default), `image-landscape`, `image-square`, `image-portrait`.
61
+ - `columns`: base count, then breakpoint-prefixed overrides (`s:`, `m:`, `l:`), e.g.
62
+ `"1 s:2 m:4"` — max 4.
63
+ - `width`: `content` (default) or `container`.
64
+ - The block title (`.xref:...[Title]`) carries the link — the whole card is that link.
65
+ - A card with an image needs the open-block form (`--`/`--`); a text-only card can be a
66
+ plain paragraph under `[card]`.
67
+
68
+ ## Accordion (grouped FAQ)
69
+
70
+ Groups a run of `[%collapsible]` blocks with proper `role=group` semantics and,
71
+ optionally, single-open behaviour — the native `[%collapsible]` on its own (see
72
+ `language-basics.md`) still works for one-off collapsibles; group them with `[accordion]`
73
+ when several belong together, e.g. an FAQ section.
74
+
75
+ ```adoc
76
+ [accordion%single-open,aria-label="Frequently asked questions"]
77
+ --
78
+ .Question one?
79
+ [%collapsible]
80
+ ====
81
+ Answer one.
82
+ ====
83
+
84
+ .Question two?
85
+ [%collapsible]
86
+ ====
87
+ Answer two.
88
+ ====
89
+ --
90
+ ```
91
+
92
+ - `%single-open` (an option, like `%collapsible`'s own) makes opening one item close the
93
+ others; omit it and items are independent (the default).
94
+ - Give the group an `aria-label=` (or a block `.Title`) — a `role=group` with no
95
+ accessible name is flagged.
96
+ - `[accordion]` is an open block (`--`) so its `[%collapsible]` children stay ordinary
97
+ `====` blocks, unchanged from how they'd read standalone.
98
+
99
+ ## Feature tabs
100
+
101
+ A media-plus-prose switcher for a handful of top-level capabilities — used on the home
102
+ page (see the `docs-internals` skill's `reference/page-patterns.md`).
103
+
104
+ ```adoc
105
+ [feature-tabs]
106
+ ====
107
+ [feature,label="Capability one"]
108
+ --
109
+ image::feature-one.png[Alt text]
110
+
111
+ Prose describing this capability.
112
+
113
+ [.cta]
114
+ xref:module:page.adoc[Learn more]
115
+ --
116
+
117
+ [feature,label="Capability two"]
118
+ --
119
+ image::feature-two.png[Alt text]
120
+
121
+ Prose describing this capability.
122
+ --
123
+ ====
124
+ ```
125
+
126
+ ## CTA
127
+
128
+ A single call-to-action block — prose plus one prominent link.
129
+
130
+ ```adoc
131
+ [cta]
132
+ ====
133
+ Prose making the case for the action.
134
+
135
+ [.primary]
136
+ https://example.com/signup[Get started]
137
+ ====
138
+ ```
139
+
140
+ ## Inline macros: `label:` and `mono:`
141
+
142
+ ```adoc
143
+ label:red[Blocked] a coloured pill — variants: white, grey, red, orange, green,
144
+ blue, purple, pink, teal (grey is the default, label:[Text])
145
+ mono:[className] plain monospaced text with no code-chip styling — for a
146
+ table cell whose entire content is a bare name/token
147
+ ```
148
+
149
+ `` `backtick code` `` (see `language-basics.md`) keeps its usual code-chip styling;
150
+ `mono:[]` is the deliberate opt-out for a column where every cell is a token and the chip
151
+ would just be noise.
152
+
153
+ ## Table and video sizing attributes
154
+
155
+ ```adoc
156
+ [table-width=720px,cols="1,1"] |=== an absolute CSS width, bypassing Asciidoctor's
157
+ |=== own width= (which is percentage-only, clamped 1-100)
158
+
159
+ [cols="1,3,2",nowrap-cols="1,2"] pins white-space: nowrap to specific columns
160
+ |===
161
+ ...
162
+ |===
163
+
164
+ video::demo[youtube,640,360] sets both dimensions and locks the aspect ratio
165
+ at any narrower viewport (no CSS-only fix exists
166
+ for an iframe/video the way there is for <img>)
167
+ ```
168
+
169
+ These aren't new blocks, just extra attributes Asciidoctor's own table/video macros don't
170
+ support natively — safe to ignore if you never need an absolute width or a nowrap column.
@@ -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/`.