-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
8 changed files
with
269 additions
and
244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
* xref:install.adoc[] | ||
* xref:quickstart.adoc[] | ||
* xref:features.adoc[] | ||
* xref:options.adoc[] | ||
** xref:custom-attributes-option.adoc[] | ||
** xref:diagrams-extension-option.adoc[] | ||
** xref:theme-stylesheet-option.adoc[] | ||
** xref:javascript-option.adoc[] | ||
** xref:load-the-javascript-option.adoc[] | ||
* xref:firefox-known-issues.adoc[Known issues] | ||
* xref:diagrams-extension-quickstart.adoc[] | ||
* xref:use-cases.adoc[] | ||
* xref:firefox-known-issues.adoc[Known issues] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
docs/modules/ROOT/pages/diagrams-extension-quickstart.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
= Diagrams extension quickstart | ||
|
||
In this quick start you'll: | ||
|
||
* [x] create an AsciiDoc file that both holds and displays a diagram when viewed with the {project-name} | ||
* [x] configure the extension to use Kroki | ||
* [x] view the converted diagram | ||
* [x] stop the extension using Kroki | ||
Below is an example diagram showing communication between the Diagrams extension and the Kroki.io server set by the *Server URL* in xref:options.adoc[]. | ||
|
||
.Diagrams extension sequence | ||
image::diagrams-extension-sequence.svg[] | ||
|
||
The diagram above uses the PlantUML diagram generator via Kroki. | ||
To learn more about embedding diagrams, other diagram languages and PlantUML, visit https://kroki.io and https://plantuml.com. | ||
|
||
== Steps | ||
|
||
To create the above diagram after installing the {project-name}, do the following: | ||
|
||
. Create a file "diagram-extension-example.adoc" with the following contents: | ||
+ | ||
.diagram-extension-example.adoc | ||
[,asciidoc] | ||
---- | ||
= Diagrams extension example with Kroki.io | ||
The sequence diagram is below: | ||
[plantuml] | ||
.... | ||
@startuml | ||
entity "Local or remote file" as file | ||
box Browser #white | ||
participant Browser as browser | ||
participant "Asciidoctor\nBrowser Extension" as extension | ||
box "Kroki Server" #white | ||
participant "Kroki Gateway" as kroki | ||
participant "Diagram generator" as generator | ||
end box | ||
file -> browser : AsciiDoc | ||
browser -> extension : AsciiDoc | ||
activate extension | ||
extension -> kroki : encoded diagram text | ||
kroki -> generator : diagram text | ||
kroki <- generator : image | ||
extension <- kroki : image | ||
browser <- extension : HTML5 | ||
deactivate extension | ||
@enduml | ||
.... | ||
---- | ||
|
||
. Enable the Diagrams extension with the default *Server URL* from the extension options. | ||
For help enabling and disabling the Diagrams extension, see the xref:options.adoc[] page. | ||
|
||
. Open or reload the above file in the browser to see the diagram. | ||
|
||
. Modify the diagram text in the AsciiDoc and reload the page to see your updated diagram. | ||
|
||
. Disable the Diagrams extension. | ||
+ | ||
IMPORTANT: Disable the Diagrams extension to stop communication with the *Server URL*. |
Oops, something went wrong.