Skip to content

Commit

Permalink
Documentation overhaul WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
pepijnve committed Jun 12, 2023
1 parent 0a52fe3 commit ba571a6
Show file tree
Hide file tree
Showing 47 changed files with 1,197 additions and 481 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ jobs:
# run: pip install symbolator
- name: Install Diagrams
run: pip install diagrams
- name: Install D2
- name: Install d2
run: |
go install oss.terrastruct.com/d2@latest
- name: Cache Structurizr
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ jobs:
brew install font-dejavu
- name: Install Diagrams
run: pip3 install diagrams
- name: Install D2
- name: Install d2
run: |
go install oss.terrastruct.com/d2@latest
- name: Run tests
Expand Down
4 changes: 3 additions & 1 deletion docs/antora.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: diagram-extension
title: Asciidoctor Diagram
version: '2.2'
version: '2.2'
nav:
- modules/ROOT/nav.adoc
39 changes: 39 additions & 0 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
* xref:index.adoc[]
* xref:installation.adoc[]
* xref:blocks.adoc[]
* xref:generate.adoc[]
* xref:output.adoc[]
* Diagram types
** xref:a2s/index.adoc[]
** xref:actdiag/index.adoc[]
** xref:barcode/index.adoc[]
** xref:blockdiag/index.adoc[]
** xref:bpmn/index.adoc[]
** xref:bytefield/index.adoc[]
** xref:d2/index.adoc[]
** xref:dbml/index.adoc[]
** xref:diagrams/index.adoc[]
** xref:ditaa/index.adoc[]
** xref:erd/index.adoc[]
** xref:gnuplot/index.adoc[]
** xref:graphviz/index.adoc[]
** xref:meme/index.adoc[]
** xref:mermaid/index.adoc[]
** xref:msc/index.adoc[]
** xref:nomnoml/index.adoc[]
** xref:nwdiag/index.adoc[]
** xref:pikchr/index.adoc[]
** xref:plantuml/index.adoc[]
** xref:seqdiag/index.adoc[]
** xref:shaape/index.adoc[]
** xref:smcat/index.adoc[]
** xref:structurizr/index.adoc[]
** xref:svgbob/index.adoc[]
** xref:symbolator/index.adoc[]
** xref:syntrax/index.adoc[]
** xref:tikz/index.adoc[]
** xref:umlet/index.adoc[]
** xref:vega/index.adoc[]
** xref:wavedrom/index.adoc[]
* Advanced Topics
** xref:enabling.adoc[]
22 changes: 22 additions & 0 deletions docs/modules/ROOT/pages/a2s/index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
== ASCIIToSVG
include::partial$uris.adoc[]

{uri-a2s}[ASCIIToSVG] is a pretty simple Go library (with an accompanying CLI tool) that parses ASCII art diagrams, attempting to convert them to an aesthetically pleasing SVG output.

== Output Formats

- SVG
- TXT

== Common Attributes

include::partial$/shared-attrs.adoc[]

== ASCIIToSVG Attributes

[cols=">,<,<",options="header"]
|===
|Name |Default value |Description
|fontfamily |unspecified |The font family to use in the generated SVG image
|noblur |unspecified |Disable drop-shadow blurring
|===
22 changes: 22 additions & 0 deletions docs/modules/ROOT/pages/actdiag/index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
= ActDiag
include::partial$uris.adoc[]

{uri-actdiag}[actdiag] generates activity-diagram images from .diag files (similar to graphviz’s DOT files).

== Output Formats

- PDF
- PNG
- SVG

== Common Attributes

include::partial$shared-attrs.adoc[]

== ActDiag Attributes

[cols=">,<,<",options="header"]
|===
|Name |Default value |Description
|fontpath |unspecified |The path to the font that should be used by blockdiag
|===
51 changes: 51 additions & 0 deletions docs/modules/ROOT/pages/barcode/index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
= Barcode
include::partial$uris.adoc[]

The barcode extension provides barcode rendering.
Barcode macros can be specified using blocks, block macros, or inline macros using one of the following templates.

[source, asciidoc]
------
// Barcode block
[<type>, <attributes>] <1> <2>
----
<content> <3>
----

// Barcode block macro
<type>::<content>[<attributes>]

// Barcode inline macro
<type>:<content>[<attributes>]
------
<1> Type barcode type. One of `bookland`, `codabar`, `code25`, `code25iata`, `code25interleaved`, `code39`, `code93`, `code128`, `code128a`, `code128b`, `code128c`, `ean8`, `ean13`, `gs1_128`, `qrcode`, or `upca`.
<2> <<Barcode Attributes>>
<3> The content to encode in the barcode

By default, the `content` field of the barcode macros will be interpreted as the barcode content.
This works fine for simple barcodes, but for complex data (e.g., a vCard encoded as a QR code) this is not practical.
If the `external` attribute is set on a barcode macro, the target is interpreted as a file path.
The barcode content will then be obtained by reading the contents of the referenced file.

== Output Formats

- PNG
- TXT

== Common Attributes

include::partial$shared-attrs.adoc[]

== Barcode Attributes

[cols=">,<,<",options="header"]
|===
|Name |Default value |Description
|external |false |When set to true the target of a barcode macro is interpreted as an external source file instead of as the contents of the barcode
|height |100 |The height of the bars. (1D only, 2D uses ydim)
|xdim |1 |The width of the narrowest bar in a barcode. Thicker bars are multiples of the xdim.
|ydim |Same as xdim |This is the same as xdim, but for the height of the blocks in a 2D barcode.
|margin |10 |The width of the quiet zone around the barcode.
|foreground |black |The color of the bars specified as a 3 or 6 digit hex RGB value or HTML color name.
|background |white |The color of the background specified as a 3 or 6 digit hex RGB value or HTML color name.
|===
Loading

0 comments on commit ba571a6

Please sign in to comment.