Shortcodes Demo
Important
This is a Beta feature currently available only on the main branch. It has not been released in a stable version yet.
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=400 height=300 -->
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.
Table of Contents
This page's table of contents:
<!-- .toc -->
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 -->
- Marmite - 2025-08-02
- Shortcodes Demo - 2025-08-01
- File Mapping Feature - 2025-08-01
- Shortcodes Guide - 2025-08-01
- Remote Theme Download - 2025-07-23
- Marmite 0.2.6 Release Notes - 2025-07-23
- Organizing Content with Series in Marmite - 2025-07-12
- Introducing Themes in Marmite - 2025-07-11
- Configuration Reference - 2025-07-10
- Filename-Based Streams: Organize Content with File Naming - 2025-07-09
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 -->
Limited tags:
<!-- .tags ord=desc items=5 -->
Social Networks
<!-- .socials -->
My social networks
Social networks not configured in marmite.yaml
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=stream-alt -->
Card for series:
<!-- .card slug=series-python-tutorial -->
Card for page:
<!-- .card slug=about -->
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