Table of Contents

Flatmark 🔗

Flatmark strives to be the most static âš¡ site generator with sensible defaults.

It is based on Jinja for templating and uses CommonMark for markdown rendering.

Most of rendering is done statically: code highlighting, math snippets, diagrams, etc.
The only thing you usually need to add for those is CSS.

Markdown 🔗

Syntax is based on commonmark standard with some extensions:

You can learn markdown in 60 seconds.

Syntax Highlighting 🔗

To use code syntax highlighting, use the code block syntax with the language specified:

            ```scala
val x = 5
```

          

Result:

            val x = 5

          

Syntax highlighting is done via highlight.js.

Math 🔗

To use math blocks, use the math code block syntax:

            ```math
x = 5
```

          

Result:

x=5 x = 5

For more details, see KaTeX.

Mermaid Diagrams 🔗

To create Mermaid diagrams, use the diagram:mermaid code block syntax:

            ```diagram:mermaid
sequenceDiagram
        actor Alice
        actor Bob
        Alice->>Bob: Hi Bob
        Bob->>Alice: Hi Alice
```

          

Result:

AliceBobHi BobHi AliceAliceBob

For more details, see Mermaid documentation.

Graphviz Diagrams 🔗

To create Graphviz diagrams, use the diagram:graphviz code block syntax:

            ```diagram:graphviz
digraph G {Hello->World}
```

          

Result:

G Hello Hello World World Hello->World

For more details, see Graphviz documentation.