Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from Codeberg with WP-CLI:
wp plugin install https://codeberg.org/stevegrunwell/mermaid-shortcode/archive/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
Mermaid Shortcode
This plugin defines a [mermaid] shortcode within WordPress, allowing posts to dynamically define and render visualizations using Mermaid.
Installation
You may either clone this entire repo or simply grab the mermaid-shortcode.php file and drop it into wp-content/plugins/.
This plugin has not yet been submitted to the WordPress.org repository.
Usage
The way the shortcode gets used will depend on whether you're using the default Block (a.k.a. "Gutenberg") or Classic (TinyMCE) editor within WordPress; when using the former, you should use the "Shortcode" block to ensure that WordPress understands that the content is meant to be a shortcode.
Regardless, the end result will be the same:
When rendered, this should produce a Mermaid diagram like the following:
Configuration can also be handled via frontmatter:
This will result in a similar diagram, but with a different theme and font-family:
For a full list of supported diagram types and options, please review the Mermaid documentation.
License (MIT)
Copyright © 2026 Steve Grunwell
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation file