Skip to content

fermarsan/quarto-kroki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

quarto-kroki

Render Kroki diagrams in Quarto documents (HTML and PDF).

This uses the Kroki HTTP API via curl, doing a POST request.

Installing

quarto add fermarsan/quarto-kroki

This will install the extension under the _extensions subdirectory.

Usage

Here is how you add the filter to a page (it can also be added to a _quarto.yml project file with the same syntax):

---
title: "My Document"
filters:
  - quarto-kroki
---

And then add the following markdown in your quarto file:

```kroki-<diagram_kind>
    diagram code
```

for instance:

```kroki-graphviz
digraph G { 
  Hello -> World 
}
```

or

```kroki-ditaa
+---------+    +---------+
|  Hello  |--->|  World  |
+---------+    +---------+
```

Make sure you have curl is installed and available in your PATH.

Examples

There are two source code minimal examples:

For PDF output

If the pdf output format is enabled, you can insert Kroki diagrams via inkscape:

---
title: "My Document"
filters:
  - quarto-kroki
format: pdf
---

In that case make sure you have inkscape installed and available in your PATH.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages