@inditextech/docouture-cli 0.1.0-SNAPSHOT.82.1 → 0.1.0-SNAPSHOT.83.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.
|
@@ -145,7 +145,7 @@ asciidoc:
|
|
|
145
145
|
page-pagination: '@'
|
|
146
146
|
# Same as the real antora-playbook.yml — see its own comment.
|
|
147
147
|
kroki-enabled: true
|
|
148
|
-
kroki-diagram-types: mermaid,plantuml,bpmn,excalidraw
|
|
148
|
+
kroki-diagram-types: mermaid,plantuml,bpmn,excalidraw,structurizr
|
|
149
149
|
extensions:
|
|
150
150
|
# Authoring blocks with no plain AsciiDoc equivalent — [tabs], [cards],
|
|
151
151
|
# [feature-tabs], [cta], [accordion] grouping, plus the label:[]/mono:[]
|
|
@@ -165,10 +165,10 @@ asciidoc:
|
|
|
165
165
|
# diagram type, ...); `docouture teardown kroki` stops it manually, since
|
|
166
166
|
# nothing stops it automatically. `kroki-diagram-types` is a
|
|
167
167
|
# comma-separated subset of kroki.js's `SUPPORTED_TYPES` (e.g. `mermaid`
|
|
168
|
-
# or `mermaid,plantuml,bpmn,excalidraw`); omit it to enable
|
|
169
|
-
# supported type.
|
|
168
|
+
# or `mermaid,plantuml,bpmn,excalidraw,structurizr`); omit it to enable
|
|
169
|
+
# every supported type.
|
|
170
170
|
kroki-enabled: true
|
|
171
|
-
kroki-diagram-types: mermaid,plantuml,bpmn,excalidraw
|
|
171
|
+
kroki-diagram-types: mermaid,plantuml,bpmn,excalidraw,structurizr
|
|
172
172
|
extensions:
|
|
173
173
|
# Authoring blocks with no plain AsciiDoc equivalent — [tabs], [cards],
|
|
174
174
|
# [feature-tabs], [cta], [accordion] grouping, plus the label:[]/mono:[]
|
|
@@ -434,10 +434,11 @@ xref:main:getting-started.adoc[Get started]
|
|
|
434
434
|
|
|
435
435
|
=== Diagrams
|
|
436
436
|
|
|
437
|
-
`[mermaid]`, `[plantuml]`, `[graphviz]` and a
|
|
438
|
-
`@inditextech/docouture-asciidoc-extensions`' `lib/kroki-config.js` for the full
|
|
439
|
-
as real diagrams via a self-hosted https://kroki.io[Kroki]
|
|
440
|
-
(four dots, not a fenced code block) styled with the diagram
|
|
437
|
+
`[mermaid]`, `[plantuml]`, `[graphviz]` and over a dozen more diagram languages (see
|
|
438
|
+
`@inditextech/docouture-asciidoc-extensions`' `lib/kroki-config.js` for the full,
|
|
439
|
+
live-verified list) render as real diagrams via a self-hosted https://kroki.io[Kroki]
|
|
440
|
+
service — a literal block (four dots, not a fenced code block) styled with the diagram
|
|
441
|
+
language's name:
|
|
441
442
|
|
|
442
443
|
[,asciidoc]
|
|
443
444
|
----
|
|
@@ -467,26 +468,97 @@ definition, or comment the two attributes back out to turn the feature off entir
|
|
|
467
468
|
block like the one above then renders exactly as plain AsciiDoc already would: the raw
|
|
468
469
|
diagram source, as literal text, same as the fenced listing shows it above.
|
|
469
470
|
|
|
471
|
+
==== Positional shorthand and diagram-specific options
|
|
472
|
+
|
|
473
|
+
The classic asciidoctor-diagram/asciidoctor-kroki `[type,target,format]` positional
|
|
474
|
+
form works alongside the named `format=` attribute already shown above — the second
|
|
475
|
+
comma-separated value is a `target` (accepted but otherwise unused: this extension
|
|
476
|
+
always inlines, never writes a named file to disk), the third is the `format`:
|
|
477
|
+
|
|
478
|
+
[,asciidoc]
|
|
479
|
+
----
|
|
480
|
+
[plantuml,connectivity-flow,png]
|
|
481
|
+
....
|
|
482
|
+
Alice -> Bob : request
|
|
483
|
+
Bob --> Alice : response
|
|
484
|
+
....
|
|
485
|
+
----
|
|
486
|
+
|
|
487
|
+
[plantuml,connectivity-flow,png]
|
|
488
|
+
....
|
|
489
|
+
Alice -> Bob : request
|
|
490
|
+
Bob --> Alice : response
|
|
491
|
+
....
|
|
492
|
+
|
|
493
|
+
Any named attribute beyond the built-in set (`target`, `width`, `height`, `format`,
|
|
494
|
+
`role`, `title`, `caption`, …) is a Kroki diagram-specific option, forwarded to Kroki as
|
|
495
|
+
a `Kroki-Diagram-Options-<key>` HTTP header — exactly as the real asciidoctor-kroki
|
|
496
|
+
extension forwards them. Structurizr's `view-key` selects which view of a
|
|
497
|
+
multi-view workspace to render:
|
|
498
|
+
|
|
499
|
+
[,asciidoc]
|
|
500
|
+
----
|
|
501
|
+
[structurizr,view-key=SystemContext]
|
|
502
|
+
....
|
|
503
|
+
workspace {
|
|
504
|
+
model {
|
|
505
|
+
user = person "User"
|
|
506
|
+
system = softwareSystem "Software System"
|
|
507
|
+
user -> system "Uses"
|
|
508
|
+
}
|
|
509
|
+
views {
|
|
510
|
+
systemContext system "SystemContext" {
|
|
511
|
+
include *
|
|
512
|
+
autoLayout
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
....
|
|
517
|
+
----
|
|
518
|
+
|
|
519
|
+
[structurizr,view-key=SystemContext]
|
|
520
|
+
....
|
|
521
|
+
workspace {
|
|
522
|
+
model {
|
|
523
|
+
user = person "User"
|
|
524
|
+
system = softwareSystem "Software System"
|
|
525
|
+
user -> system "Uses"
|
|
526
|
+
}
|
|
527
|
+
views {
|
|
528
|
+
systemContext system "SystemContext" {
|
|
529
|
+
include *
|
|
530
|
+
autoLayout
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
....
|
|
535
|
+
|
|
470
536
|
==== Styling
|
|
471
537
|
|
|
472
538
|
Mermaid diagrams are themed to match this site automatically — square
|
|
473
|
-
corners, black-on-white
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
539
|
+
corners, black-on-white, body typography — via a `%%{init: {...}}%%` directive this
|
|
540
|
+
extension prepends to the diagram's own source before it ever reaches Kroki, not via
|
|
541
|
+
CSS. Write your own `%%{init...}%%` as the diagram's first line to opt out and take
|
|
542
|
+
full control of Mermaid's own theming instead. Every other diagram type's font is
|
|
543
|
+
still normalized via CSS (safe — a tool's typeface choice carries no meaning). BPMN's
|
|
544
|
+
own rounded task-box corners could not be un-rounded by any means found — bpmn-js
|
|
545
|
+
hardcodes that radius; this is a real, currently-unfixed limitation, not an oversight.
|
|
546
|
+
|
|
547
|
+
The card framing a diagram follows this site's own light/dark theme, same as any other
|
|
548
|
+
card — but the diagram's own canvas underneath it is always a fixed white, regardless of
|
|
549
|
+
theme: diagram tools don't agree on whether they draw a background at all (GraphViz
|
|
550
|
+
bakes its own opaque white one; Mermaid and PlantUML bake none), so a fixed canvas is
|
|
551
|
+
what makes every diagram read the same rather than depending on that inconsistency —
|
|
552
|
+
and it means a diagram's own colors never need inverting for dark mode, avoiding the
|
|
553
|
+
distortion that would cause for anything genuinely colorful (a PlantUML `skinparam`
|
|
554
|
+
palette, a Structurizr diagram's own color-coded boxes, an Excalidraw scene).
|
|
555
|
+
|
|
556
|
+
==== Output formats
|
|
557
|
+
|
|
558
|
+
`[mermaid,format=png]` (or any other diagram language and format Kroki's own server
|
|
559
|
+
accepts for it — see `kroki-config.js`'s `FORMAT_SUPPORT` for the exact, live-verified
|
|
560
|
+
matrix; it varies per type, not a blanket rule) renders a raster image instead of
|
|
561
|
+
inline SVG:
|
|
490
562
|
|
|
491
563
|
[,asciidoc]
|
|
492
564
|
----
|
|
@@ -511,9 +583,29 @@ Embedded as a plain `<img>` with a base64 `data:` URI — no extra file written,
|
|
|
511
583
|
HTTP request. Reach for this only when you actually need a raster image (an export, an
|
|
512
584
|
email, a renderer that can't handle inline SVG); the inline-SVG default stays sharper at
|
|
513
585
|
every zoom level and lets a reader select/search the diagram's own text, neither of
|
|
514
|
-
which a
|
|
515
|
-
|
|
516
|
-
`
|
|
586
|
+
which a raster format can do. Beyond `png`: `jpeg` (`jpg` also accepted), `pdf`
|
|
587
|
+
(embedded as an `<embed>`, since a browser can't display a PDF through `<img>`) and
|
|
588
|
+
`base64` all render the same way. An unsupported type/format combination, or a typo'd
|
|
589
|
+
`format=` value, falls back to `svg` with a build warning, the same degrade-not-fail
|
|
590
|
+
posture as an unknown `kroki-diagram-types` entry.
|
|
591
|
+
|
|
592
|
+
`txt`/`atxt`/`utxt` are different in kind, not just encoding — Kroki renders these as a
|
|
593
|
+
literal ASCII-art-style text representation, not an image at all:
|
|
594
|
+
|
|
595
|
+
[,asciidoc]
|
|
596
|
+
----
|
|
597
|
+
[plantuml,format=txt]
|
|
598
|
+
....
|
|
599
|
+
Alice -> Bob : request
|
|
600
|
+
Bob --> Alice : response
|
|
601
|
+
....
|
|
602
|
+
----
|
|
603
|
+
|
|
604
|
+
[plantuml,format=txt]
|
|
605
|
+
....
|
|
606
|
+
Alice -> Bob : request
|
|
607
|
+
Bob --> Alice : response
|
|
608
|
+
....
|
|
517
609
|
|
|
518
610
|
==== BPMN
|
|
519
611
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inditextech/docouture-cli",
|
|
3
|
-
"version": "0.1.0-SNAPSHOT.
|
|
3
|
+
"version": "0.1.0-SNAPSHOT.83.1",
|
|
4
4
|
"description": "Command-line tool for docouture documentation sites: scaffold a new site and set its Antora version outside the monorepo",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|