---
title: Shortcodes
[!NOTE]
Work in progress. The information on this page is a copy paste result from old notes and documentation. Needs rewrite.
shortcodes-index.md# Shortcodes
Shortcodes are reusable content snippets that simplify complex HTML structures in Markdown files.
Use shortcodes with the `{{/*< >*/}}` or `{{/*% %*/}}` syntax in your content files.
---
## Available Shortcodes
| Name | Purpose | Example Usage |
|-----------|-------------------------------|--------------------------------------------|
| `figure` | Responsive image with caption | `{{/*< figure src="/img/example.jpg" caption="An image" >*/}}` |
| `button` | Renders a styled button | `{{/*< button href="/contact" */>}}Say Hello{{/*< /button >*/}}` |
| `highlight` | Syntax highlighting (fallback) | `{{/*< highlight html >*/}}...{{/*< /highlight >*/}}` |
> 💡 These shortcodes can be extended or replaced in your own project. Place overrides under `layouts/shortcodes/`.
---
## Example: `figure` Shortcode
### Markdown
{{< figure src="/images/cat.jpg" caption="This is a cat" >}}
```
<figure>
<img src="/images/cat.jpg" alt="This is a cat">
<figcaption>This is a cat</figcaption>
</figure>
layouts/shortcodes/ folder.
---
### 📄 `partials-index.md`
Partials are reusable template blocks used in layouts and components. They simplify common rendering tasks.
Location: partials/content/components/breadcrumbs.html
Renders a breadcrumb trail with microdata support. Automatically pulls from page hierarchy and supports overrides.
linktitle if present.Location: partials/components/debug-toggle.html
Toggles developer overlays like spacing grids and outline borders via Alpine.js.
Add this partial in your base layout (only in development):
{{ partial "components/debug-toggle.html" . }}
Includes toggles for:
* Grid overlay
* Outline borders
* Spacing rulers
layouts/partials/.```
Readme.md:Cleaned out from Readme.md.
Let me know when you're ready to move on — or if you want to split off the debug-toggle docs into their own file instead.