The Mermaid plugin turns text in a page into diagrams – flowcharts, sequence diagrams, timelines, mind maps and more. Diagrams match the site's light or dark mode, so try the light/dark switch, and they always print in light colours.

This page is also a test page: copy it into a site's user/pages (for example as 99.mermaid-demo/default.md) and check it against the list at the end. A Flowchart

Choosing how to start with open educational resources (OER) comes down to two questions:

Yes

No

Yes

No

Does an open resource exist?

Does it fit as it is?

  1. Create and publish

  2. Adopt as it is

  3. Adapt for your context

The diagram is written as text, in a code block marked mermaid, so anyone reusing the page can revise it:

MERMAID
flowchart TD
    accTitle: Choosing an entry point for OER
    accDescr: A decision chart. If an open resource already exists and fits your course as it is, adopt it. If one exists but needs changes, adapt it. If nothing suitable exists, create and publish your own.

    EXISTS("`Does an open resource exist?`") -->|Yes| FITS("`Does it fit as it is?`")
    EXISTS -->|No| CREATE["`**3. Create** and publish`"]
    FITS -->|Yes| ADOPT["`**1. Adopt** as it is`"]
    FITS -->|No| ADAPT["`**2. Adapt** for your context`"]

The accTitle and accDescr lines give screen readers a title and description, like an image's alt text. A Sequence Diagram

How a page edit travels between Grav and a Git repository with Git Sync. This one uses the older [mermaid]...[/mermaid] tags from the Mermaid Diagrams plugin, which still work. GitHubGravGitHubGravAuthorContributorSave a page in AdminCommit and pushPropose a changeWebhook, once mergedPull the updateAuthorContributor A Timeline

One way a course might move to open materials, a step at a time: Term 1Adopt an opentextbookTerm 2Adapt two chaptersAdd a local labguideTerm 3Publish the adaptedversionInvite contributions A Mind Map with Its Own Colours

The 5Rs of open content. This diagram sets its own colour theme (forest), which it keeps in both light and dark mode.

The 5Rs

Retain

Keep a copy

Reuse

Use it as it is

Revise

Adapt or translate it

Remix

Combine it with others

Redistribute

Share copies

Custom Colours

Boxes can have their own colours with classDef. Here, white text on a dark box, and bold text from Markdown strings:

No

Yes

No

Yes

❓ Something to ask or raise

Is it personal to you?

💬 Course forum, public post Most questions go here

Is it sensitive or confidential?

🔒 Private forum post or email the teaching team

🛡️ Email the instructor For confidential matters

Text as Typed

In plain labels, characters such as * and _ show exactly as typed – Grav's Markdown never changes diagram text. For bold or italics, use a Markdown string in backticks instead.

Plain label: draft notes_v2.md

Markdown string: bold and italic

A Diagram with a Mistake

A diagram that Mermaid can't read shows an error box in its place, and the rest of the page still works: Syntax error in textmermaid version 11.17.2 Testing Checklist

When checking this page after an update, each item should hold:

TXT
Every diagram above draws, except the one with a mistake, which shows an error box
No diagram code shows while the page loads – just a blank space until each diagram appears
Switching light and dark mode redraws the diagrams to match, except the mind map, which keeps its forest colours
Printing from dark mode gives light diagrams
The dark box in Custom Colours has white text
In Text as Typed, *draft* and notes_v2.md show as typed, while the Markdown string shows bold and italics
The two code blocks below, and the one in A Flowchart, stay as code

A plain code block:

flowchart LR A --> B

A [mermaid] tag inside a code block:

MERMAID
flowchart LR
    A --> B