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=alt -->
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 -->
- index (36 posts)
- issue-test (3 posts)
- tutorial (3 posts)
- alt (1 posts)
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-01-02
- Image Optimization and Resizing - 2025-12-22
- Marmite 0.2.7 Release Notes - 2025-12-22
- Comunicação na Programação é muito importante & útil - 2025-11-25
- Special Characters in Tags - 2025-11-25
- This is a test of special chars on explicit slug - 2025-11-25
- Wikilinks Demo & How To Guide - 2025-11-24
- Python Installation with pip - 2025-08-06
- Image Gallery - 2025-08-03
- Installation - 2025-08-02
With custom parameters:
<!-- .posts ord=asc items=5 -->
- Pagination - 2023-01-01
- Enabling Comments - 2024-10-15
- Hosting - 2024-10-16
- Markdown Formatting Options - 2024-10-17
- Using Markdown to customize layout - 2024-10-18
Pages List
All pages:
<!-- .pages -->
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