Tom Cammann cb9cec76e3 Support yaml front matter in mermaid blocks
Mermaid diagrams can start with yaml front matter, e.g.
```
---
title: Example Diagram
---
graph LR
  A --> B
```

Relearn injects an init directive
`%%{init: {"theme":"default"}}%%` at the top of a mermaid block to
support theming the mermaid diagram. However this will cause a syntax
parser error in mermaid if the init directive comes before the yaml
front matter.

Valid:
```
%%{init: {"theme":"default"}}%%
graph LR
    A --> B
```
Invalid:
```
%%{init: {"theme":"default"}}%%
---
title: Example
---
graph LR
    A --> B
```

To support yaml front matter, we detect if front matter is used, and
inject the init directive after the front matter.

```
---
title: Example
---
%%{init: {"theme":"default"}}%%
graph LR
    A --> B
```
2023-06-09 11:52:23 +01:00
2022-10-09 12:19:12 +02:00
2023-06-06 20:38:50 +02:00
2023-02-21 22:57:38 +01:00
2022-03-13 14:15:26 +01:00
2023-01-28 11:55:55 +01:00
2023-02-21 19:52:22 +01:00
2023-02-21 19:44:22 +01:00
2022-12-14 22:17:43 +01:00
2021-08-22 13:30:05 +02:00

Hugo Relearn Theme

A theme for Hugo designed for documentation.

★ What's new in the latest release ★

Image of the Relearn theme in light and dark mode on phone, tablet and desktop

Motivation

The Relearn theme is a fork of the great Learn theme with the aim of fixing long outstanding bugs and adepting to latest Hugo features. As far as possible this theme tries to be a drop-in replacement for the Learn theme.

Features

Installation & Usage

For a detailed description of the theme's capabilities visit the official documentation.

Changelog

See the What's New page for release highlights or the detailed change history for a complete list of changes.

Contributions

You are most welcome to contribute bugfixes or new features. Check the contribution guidelines first before starting.

License

The Relearn theme is licensed under the MIT License.

Credits

This theme would not be possible without the work of many others.

Description
A theme for Hugo designed for documentation
Readme MIT 857 MiB
Languages
JavaScript 97.7%
CSS 1.4%
HTML 0.9%