Markdown
The content editor supports two writing formats selectable per item in the admin panel: HTML (the default rich editor) and Markdown. Switching to Markdown replaces the WYSIWYG toolbar with a CodeMirror plain-text editor.
The format is stored in $item['content_format'] — 'html' or 'markdown'. Theme templates do not need to handle this: render_content_html() detects the format and runs the Markdown conversion automatically before the shortcode pipeline.
Supported syntax
Headings
# H1
## H2
### H3
#### H4
##### H5
###### H6
All headings get an id="toc-{slug}" anchor automatically, making them compatible with the [toc] shortcode.
Inline formatting
| Syntax | Output |
|---|---|
**bold** or __bold__ | bold |
*italic* or _italic_ | italic |
~~strikethrough~~ | |
` inline code | inline code` |
Links and images
[Link text](https://example.com)

To open a link in a new tab, append {:target="_blank"} to the URL:
[Opens in new tab](https://example.com{:target="_blank"})
Image resizing
You can control the rendered size of an image by appending a size hint inside the parentheses, after the URL and a space:



| Syntax | Effect |
|---|---|
=300x | Sets width="300". Height scales automatically. |
=x200 | Sets height="200". Width is unconstrained. |
=300x200 | Sets both width="300" and height="200". |
Integer values are treated as pixels. Append % to use a percentage instead:

All resized images keep max-width: 100% so they never overflow their container on small screens.
Lists
- Unordered item
* Also unordered
+ Also works
1. First
2. Second
3. Third
Nested lists
Nesting is supported at any depth. Indent child items by 2 or more spaces relative to their parent:
- Item 1
- Child 1
- Child 2
- Grandchild
- Item 2
1. First
1. Sub-item
2. Sub-item
2. Second
Mixed list types are also supported — an ordered list can contain an unordered child list and vice versa:
- Unordered parent
1. Ordered child
2. Ordered child
The minimum indentation for a child level is 2 spaces. Blank lines between items are tolerated without closing the list.
Blockquotes
> This is a blockquote.
> It can span multiple lines.
Footnotes
Footnotes use a two-part syntax: an inline marker in the body, and a definition block anywhere in the document (conventionally at the bottom, before the closing disclaimer).
This claim is supported by research.[^1]
Multiple citations can stack on a single sentence.[^2] [^3]
[^1]: Author, A. (2023). Title of the study. *Journal Name*, vol(issue), pages. DOI: 10.xxxx/xxxxx. https://pubmed.ncbi.nlm.nih.gov/XXXXXXXX/ — One-line note explaining exactly what this source supports.
[^2]: Author, B. & Author, C. (2022). Another title. *Another Journal*. https://example.com
[^3]: Author, D. (2021). Third source. *Journal*. https://example.com
The marker [^1] in the body renders as a superscript link. The definition [^1]: renders as a numbered entry in a <section class="footnotes"> block appended after the content.
Marker naming: labels can be any alphanumeric string — [^1], [^smith2023], [^note-a] are all valid. Numbers are conventional for bibliographic references.
Stacking multiple citations: place markers back-to-back with a single space between them. Do not use commas or parentheses between markers.
Inflammation markers rise significantly under chronic stress.[^1] [^2]
Source definition format used in health and science articles on this site:
[^1]: Last, F. et al. (Year). Full title of the article. *Journal Name in Italics*, volume(issue), pages. DOI: 10.xxxx/xxxxx. PubMed PMID: XXXXXXXX. https://pubmed.ncbi.nlm.nih.gov/XXXXXXXX/ — Short note specifying exactly what data or claim this source supports (e.g. "Reduction of phytates 46–65% after 72h germination; extractability of Fe/Zn/Ca +25–36%.").
Breaking that format down:
| Field | Format | Notes |
|---|---|---|
| Authors | Last, F. et al. | Up to 3 authors listed; use et al. beyond that |
| Year | (2023) | Publication year in parentheses |
| Title | Plain text | Sentence case |
| Journal | *Italics* | Full journal name, italicised |
| Volume/issue | 40(1) | Optional but recommended |
| DOI | DOI: 10.xxxx/xxxxx | Preferred over URL alone when available |
| PMID | PubMed PMID: XXXXXXXX | Include for PubMed-indexed sources |
| URL | Full https:// link | Direct link to the source, not a search page |
| Annotation | After — | One sentence specifying the exact claim or data this source backs |
The annotation after — is required on this site. It lets readers (and editors) verify at a glance which specific figure or statement each source supports, without opening the link.
Horizontal rule
Any of these produce <hr>:
---
***
___
Tables (GFM)
| Column A | Column B | Column C |
|---|---|---|
| Value 1 | Value 2 | Value 3 |
Column alignment syntax (:---, :---:, ---:) is not currently supported — all columns are left-aligned.
Fenced code blocks
```php
echo render_content_html($item['content'], $item);
```
Any language identifier is supported — syntax highlighting is applied client-side via Highlight.js if loaded by the theme.
Hard line breaks
Two trailing spaces at the end of a line produce <br>:
Line one
Line two
Containers (:::)
Containers are a Markdown extension that maps to the same callout blocks as the [callout] shortcode. They are the preferred way to add callouts in Markdown content.
<div class="sc-callout sc-callout-info"><span class="sc-callout-icon">ℹ️</span><div class="sc-callout-body"><p>This is an informational note.</p>
</div></div>
<div class="sc-callout sc-callout-warning"><span class="sc-callout-icon">⚠️</span><div class="sc-callout-body"><p class="sc-callout-title"><strong>Optional title</strong></p><p>Pay attention to this.</p>
</div></div>
Supported types
| Alias | Rendered type | Colour |
|---|---|---|
info, note | info | Blue |
warning, caution | warning | Orange |
tip, success | tip | Green |
danger, error | danger | Red |
An optional title can follow the type on the same line — it is rendered as a bold paragraph inside the callout body.
Using CMS shortcodes in Markdown
All CMS shortcodes work normally inside Markdown content. They are preserved intact during Markdown conversion and parsed afterward by the shortcode pipeline.
Here is a list of recent articles:
[recent_articles limit="3" category="design"]
And a contact form:
[contact_form]
Shortcodes in code blocks
Square brackets inside fenced code blocks and inline code spans are encoded as HTML entities during conversion ([ → [, ] → ]). This prevents the shortcode parser from treating code examples as real shortcodes. The displayed output in the browser is correct.
Limitations
- Table column alignment (
:---,:---:) is not supported. - Raw HTML embedded in Markdown is passed through as-is — use with care.
- The parser is a lightweight custom implementation, not CommonMark-compliant. Edge cases in complex nested formatting may not render as expected.
- Footnote labels must be unique within a document. Reusing the same label (e.g. two separate
[^1]definitions) causes the second to silently override the first.
