Table of Contents

Flatmark Documentation 🔗

Flatmark tries to be a simple static site generator without too much configuration.

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

Most of rendering is done statically: code highlighting, math, 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=5x = 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:

digraph G {Hello->World}

For more details, see Graphviz documentation.