Shortcodes Demo
Note
This feature was added in version 0.2.7.
This post demonstrates the new shortcodes feature in Marmite.
Read more about how to create your own shortcodes on Shortcodes Guide > creating-custom-shortcodes
YouTube Video
Here's a video about static site generators:
<!-- .youtube id=dQw4w9WgXcQ -->
You can also specify custom dimensions:
<!-- .youtube id=dQw4w9WgXcQ width=200 height=100 -->
Card Display
Card shortcodes allow you to display content previews with image, title and description:
<!-- .card slug=tag-markdown -->
You can also display cards for other content types:
<!-- .card slug=getting-started -->
Card for author:
<!-- .card slug=author-rochacbruno -->
With custom parameters:
<!-- .card slug="https://dynaconf.com" image="https://github.com/dynaconf.png" title="Custom Title" text="Custom Description" content_type="Project" -->
External link card:
<!-- .card slug="https://github.com/rochacbruno/marmite" title="Marmite Repository" text="Static site generator written in Rust" content_type="GitHub" image="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" -->
Card for stream:
<!-- .card slug=tutorial -->
Card for series:
<!-- .card slug=series-python-tutorial -->
Card for page:
<!-- .card slug=about -->
Image Gallery
<!-- .gallery path=summer2025 -->
Summer 2025 Vacation
Table of Contents
This page's table of contents:
<!-- .toc -->
Table of Contents
Authors List
All authors on this site:
<!-- .authors -->
Streams List
Available content streams:
<!-- .streams ord=desc items=5 -->
Series List
All content series:
<!-- .series -->
- python-tutorial (3 posts)
With parameters:
<!-- .series ord=desc items=3 -->
- python-tutorial (3 posts)
Posts List
Recent posts:
<!-- .posts -->
Recent posts
- Marmite Documentation - 2026-07-31
- Marmite 0.4.2 Release Notes - 2026-07-31
- Create a custom landing page for your marmite blog - 2026-07-29
- Marmite 0.4.1 Release Notes - 2026-07-29
- Marmite Editor - 2026-07-10
- Marmite Toolbar - 2026-07-09
- Content Management API - 2026-07-09
- Marmite 0.4.0 Release Notes - 2026-07-06
- Folder-Level Frontmatter Defaults - 2026-07-04
- Workspace - Multi-Site Support - 2026-07-03
With custom parameters:
<!-- .posts ord=asc items=5 -->
- Pagination - 2023-01-01
- Paginacion - 2023-01-02
- Enabling Comments - 2024-10-15
- Hosting - 2024-10-16
- Markdown Formatting Options - 2024-10-17
Pages List
All pages:
<!-- .pages -->
- Contributors
- Creating Translated Content from the CLI
- Showcase
- TWSBI Eco Indigo Blue & de Atramentis Document Brown
- This is a page with no front matter
- Title is A
- about
Tags List
All tags with post counts:
<!-- .tags -->
Tags
Limited tags:
<!-- .tags ord=desc items=5 -->
Social Networks
<!-- .socials -->
My social networks
- LinkedIn: https://www.linkedin.com/in/rochacbruno/
- Github: https://github.com/rochacbruno
Spotify Embed
Embed Spotify albums, playlists, or tracks:
<!-- .spotify url="album/3aJozZhPbj8hKmJePJ2LtF" -->
You can also embed playlists with custom dimensions:
<!-- .spotify url="playlist/2GLlqaI9fD5bVwE7LIAQCh" width="100%" height="280" -->
Or a podcast episode:
<!-- .spotify url="episode/7ph7Vszk9Hld8y0MOEc0rl" -->
Note
Spotify does not allow multiple embeds on the same page.
Conclusion
Shortcodes make it easy to add dynamic content to your static site! With 8 builtin shortcodes, you can create rich, interactive content while keeping your markdown clean and readable.
Please consider giving a ☆ on Marmite Github repository, that helps a lot!
Comments