This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/master by this push:
     new c30c1ae  ISIS-2426: antora: fixes to make the interactive plantuml 
diagrams work with intellij-asciidoc-plugin
c30c1ae is described below

commit c30c1ae0a44e4f23356f7f4d5958c829ae621938
Author: Andi Huber <[email protected]>
AuthorDate: Tue Sep 8 10:28:39 2020 +0200

    ISIS-2426: antora: fixes to make the interactive plantuml diagrams work 
with intellij-asciidoc-plugin
---
 .asciidoctorconfig                                 |  4 ++++
 .../documentation/pages/asciidoc-syntax.adoc       | 26 ++++++++--------------
 antora/components/system/modules/ROOT/nav.adoc     |  2 +-
 .../system/modules/ROOT/pages/about.adoc           |  6 ++---
 .../system/modules/ROOT/pages/{l1 => c4}/C4.puml   |  0
 .../ROOT/pages/{l1 => c4}/C4_Component.puml        |  0
 .../ROOT/pages/{l1 => c4}/C4_Container.puml        |  0
 .../modules/ROOT/pages/{l1 => c4}/C4_Context.puml  |  0
 .../system/modules/ROOT/pages/c4/l1.adoc           |  9 ++++++++
 .../modules/ROOT/pages/{l1/l1.adoc => c4/l2.adoc}  | 17 ++++++++++----
 .../modules/ROOT/pages/{l1 => c4}/system.adoc      | 13 ++++++++++-
 .../system/modules/ROOT/pages/l1/l2.adoc           | 12 ----------
 12 files changed, 51 insertions(+), 38 deletions(-)

diff --git a/.asciidoctorconfig b/.asciidoctorconfig
index 5811ec6..e79a779 100644
--- a/.asciidoctorconfig
+++ b/.asciidoctorconfig
@@ -5,3 +5,7 @@
 :experimental:
 :idprefix:
 :idseparator: -
+// antora only builds interactive diagrams when mode is [interactive] (as 
defined in the playbook)
+// the asciidoctor-intellij-plugin will only preview interactive links if mode 
is [inline]
+// see discussion here 
https://github.com/asciidoctor/asciidoctor-intellij-plugin/issues/548
+:kroki-default-options: inline
diff --git 
a/antora/components/conguide/modules/documentation/pages/asciidoc-syntax.adoc 
b/antora/components/conguide/modules/documentation/pages/asciidoc-syntax.adoc
index 0d50021..b029100 100644
--- 
a/antora/components/conguide/modules/documentation/pages/asciidoc-syntax.adoc
+++ 
b/antora/components/conguide/modules/documentation/pages/asciidoc-syntax.adoc
@@ -795,7 +795,7 @@ Asciidoctor includes support for the 
link:https://c4model.com//[c4 model].
 For example:
 
 ....
-[plantuml,images/asciidoctor/c4-demo,svg]
+[plantuml,c4-demo,svg]
 ----
 @startuml
 !includeurl 
https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4_Container.puml
@@ -818,24 +818,16 @@ Rel(banking_system, mainframe, "Uses")
 
 renders as:
 
-[plantuml,images/asciidoctor/c4-demo,svg]
+[plantuml,c4-demo,svg]
 ----
-@startuml
-!includeurl 
https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4_Container.puml
-
-title System Context diagram for Internet Banking System
-
-Person(customer, "Banking Customer", "A customer of the bank, with personal 
bank accounts.")
-System(banking_system, "Internet Banking System", "Allows customers to check 
their accounts.")
-
-System_Ext(mail_system, "E-mail system", "The internal Microsoft Exchange 
e-mail system.")
-System_Ext(mainframe, "Mainframe Banking System", "Stores all of the core 
banking information.")
+class Car
 
-Rel(customer, banking_system, "Uses")
-Rel_Back(customer, mail_system, "Sends e-mails to")
-Rel_Neighbor(banking_system, mail_system, "Sends e-mails", "SMTP")
-Rel(banking_system, mainframe, "Uses")
-@enduml
+Driver - Car : drives >
+Car *- Wheel : have 4 >
+Car -- Person : < owns
+note right
+[[../l1/l2]]
+end note
 ----
 
 
diff --git a/antora/components/system/modules/ROOT/nav.adoc 
b/antora/components/system/modules/ROOT/nav.adoc
index f056608..54cf665 100644
--- a/antora/components/system/modules/ROOT/nav.adoc
+++ b/antora/components/system/modules/ROOT/nav.adoc
@@ -3,7 +3,7 @@
 
 * Level 1
 
-** xref:system:ROOT:l1/system.adoc[System Diagram]
+** xref:system:ROOT:c4/system.adoc[System Diagram]
 
 
 
diff --git a/antora/components/system/modules/ROOT/pages/about.adoc 
b/antora/components/system/modules/ROOT/pages/about.adoc
index 724387a..2814584 100644
--- a/antora/components/system/modules/ROOT/pages/about.adoc
+++ b/antora/components/system/modules/ROOT/pages/about.adoc
@@ -17,19 +17,19 @@ This table summarises all c4 Diagrams.
 | System
 | Maven Core Modules
 |
-* xref:system:ROOT:l1/system.adoc[System Overview]
+* xref:system:ROOT:c4/system.adoc[System Overview]
 
 | 2
 | System
 | Testing Links (Interactive)
 |
-* xref:system:ROOT:l1/l1.adoc[L1]
+* xref:system:ROOT:c4/l1.adoc[L1]
 
 | 2
 | System
 | Testing Links (Interactive)
 |
-* xref:system:ROOT:l1/l2.adoc[L2]
+* xref:system:ROOT:c4/l2.adoc[L2]
 
 |===
 
diff --git a/antora/components/system/modules/ROOT/pages/l1/C4.puml 
b/antora/components/system/modules/ROOT/pages/c4/C4.puml
similarity index 100%
rename from antora/components/system/modules/ROOT/pages/l1/C4.puml
rename to antora/components/system/modules/ROOT/pages/c4/C4.puml
diff --git a/antora/components/system/modules/ROOT/pages/l1/C4_Component.puml 
b/antora/components/system/modules/ROOT/pages/c4/C4_Component.puml
similarity index 100%
rename from antora/components/system/modules/ROOT/pages/l1/C4_Component.puml
rename to antora/components/system/modules/ROOT/pages/c4/C4_Component.puml
diff --git a/antora/components/system/modules/ROOT/pages/l1/C4_Container.puml 
b/antora/components/system/modules/ROOT/pages/c4/C4_Container.puml
similarity index 100%
rename from antora/components/system/modules/ROOT/pages/l1/C4_Container.puml
rename to antora/components/system/modules/ROOT/pages/c4/C4_Container.puml
diff --git a/antora/components/system/modules/ROOT/pages/l1/C4_Context.puml 
b/antora/components/system/modules/ROOT/pages/c4/C4_Context.puml
similarity index 100%
rename from antora/components/system/modules/ROOT/pages/l1/C4_Context.puml
rename to antora/components/system/modules/ROOT/pages/c4/C4_Context.puml
diff --git a/antora/components/system/modules/ROOT/pages/c4/l1.adoc 
b/antora/components/system/modules/ROOT/pages/c4/l1.adoc
new file mode 100644
index 0000000..1c22dbe
--- /dev/null
+++ b/antora/components/system/modules/ROOT/pages/c4/l1.adoc
@@ -0,0 +1,9 @@
+[plantuml,demo,svg,opts="{kroki-default-options}"]
+----
+class Demo1
+note right
+[[../c4/l2 link to 2]]
+end note
+----
+
+
diff --git a/antora/components/system/modules/ROOT/pages/l1/l1.adoc 
b/antora/components/system/modules/ROOT/pages/c4/l2.adoc
similarity index 57%
rename from antora/components/system/modules/ROOT/pages/l1/l1.adoc
rename to antora/components/system/modules/ROOT/pages/c4/l2.adoc
index bae758b..1f3ad58 100644
--- a/antora/components/system/modules/ROOT/pages/l1/l1.adoc
+++ b/antora/components/system/modules/ROOT/pages/c4/l2.adoc
@@ -1,15 +1,24 @@
-[plantuml%interactive, l1, svg, id="l1", width="800px"]
+[c4plantuml, c4, svg, opts="{kroki-default-options}"]
 ----
-@startuml
-!includeurl 
https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4_Container.puml
+@startuml C4_Elements
+!includeurl 
https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/release/1-0/C4_Container.puml
 
 Person(personAlias, "Label", "Optional Description")
 Container(containerAlias, "Label", "Technology", "Optional Description")
 System(systemAlias, "Label", "Optional Description")
 note right
-[[../l1/l2]]
+[[../c4/l1 link to 1]]
 end note
 
 Rel(personAlias, containerAlias, "Label", "Optional Technology")
 @enduml
 ----
+
+[plantuml, demo, svg, opts="{kroki-default-options}"]
+----
+class demo
+note right
+[[../c4/l1 link to 1]]
+end note
+----
+
diff --git a/antora/components/system/modules/ROOT/pages/l1/system.adoc 
b/antora/components/system/modules/ROOT/pages/c4/system.adoc
similarity index 63%
rename from antora/components/system/modules/ROOT/pages/l1/system.adoc
rename to antora/components/system/modules/ROOT/pages/c4/system.adoc
index eb6a35c..a462825 100644
--- a/antora/components/system/modules/ROOT/pages/l1/system.adoc
+++ b/antora/components/system/modules/ROOT/pages/c4/system.adoc
@@ -1,8 +1,11 @@
+ifdef::env-idea[:kroki-default-options: inline]
+
+
 = System
 
 WARNING: this is work-in-progress.
 
-[plantuml%interactive, level-1-system, svg]
+[c4plantuml, level-1-system, svg, opts="{kroki-default-options}"]
 ----
 @startuml
 !includeurl 
https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4_Container.puml
@@ -12,3 +15,11 @@ System(systemAlias, "Label", "Optional Description")
 Rel(personAlias, containerAlias, "Label", "Optional Technology")
 @enduml
 ----
+
+[plantuml,demo,svg,opts="{kroki-default-options}"]
+----
+class Demo
+note right
+[[https://www.google.com]]
+end note
+----
diff --git a/antora/components/system/modules/ROOT/pages/l1/l2.adoc 
b/antora/components/system/modules/ROOT/pages/l1/l2.adoc
deleted file mode 100644
index d545feb..0000000
--- a/antora/components/system/modules/ROOT/pages/l1/l2.adoc
+++ /dev/null
@@ -1,12 +0,0 @@
-[plantuml%interactive, l2, svg, id="l2", width="800px"]
-----
-@startuml
-!includeurl 
https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/master/C4_Container.puml
-
-System(systemAlias, "Label", "L2")
-note right
-[[../l1/l1]]
-end note
-
-@enduml
-----

Reply via email to