markdown-showcase.md
Every Markdown Feature This Blog Supports
A living reference for writing posts — thumbnails, code, tables, alerts, footnotes, images, audio, video, and YouTube embeds.
- Markdown
- Blog
- Reference
This post is the authoring reference for mahdi.is-a.dev/blog. Bookmark it when writing new articles.
Frontmatter fields
Every post lives in content/blog/*.md with YAML frontmatter:
---
title: "Post title"
description: "One-line summary for SEO & cards"
date: "2025-06-07"
updated: "2025-06-08" # optional
tags: ["React", "Next.js"]
featured: true # optional — larger card on index
published: true # false = hidden draft
thumbnail: "/blog/thumbs/x.jpg" # card & post header cover
image: "/blog/og/x.jpg" # optional OG/Twitter override
---thumbnail powers card covers and the post header hero. Falls back to image when omitted.
Typography & text
Regular bold, italic, strikethrough, and inline code all render with design-system colors.
Keyboard shortcuts look like Ctrl + S.
Autolinks work out of the box: https://nextjs.org
External links open in a new tab with a ↗ indicator — Next Production.
Lists
Ordered lists:
- Parse markdown at build time
- Generate static HTML
- Deploy to any CDN
Unordered nested lists:
- Frontend
- React & Next.js
- TypeScript
- Tooling
- GitHub Actions
- Tailwind CSS
Task lists:
- Thumbnails on cards
- YouTube embeds
- Syntax-highlighted code
- Your next post here
Code blocks
Fenced blocks get Shiki highlighting, line numbers, optional filenames, and line highlights:
import { markdownToHtml } from "./markdown-processor";
export async function getPostBySlug(slug: string) {
const raw = fs.readFileSync(`content/blog/${slug}.md`, "utf8");
const { content } = matter(raw);
const html = await markdownToHtml(content);
const toc = extractToc(content);
return { slug, html, toc };
}Each block also gets a Copy button and terminal-style chrome in the browser.
Tables
| Feature | Syntax | Rendered |
|---|---|---|
| Thumbnail | thumbnail: in frontmatter |
Card + header cover |
| YouTube | ::youtube ID |
Responsive iframe |
| Video | ::video /path.mp4 |
HTML5 <video> |
| Audio | ::audio /path.mp3 |
HTML5 <audio> |
GitHub alerts
[!NOTE] Alerts use GFM syntax. Great for callouts without custom components.
[!TIP] Set
featured: trueto pin a post to the top grid on/blog.
[!IMPORTANT] Thumbnails should be 16:9 for best results — SVG, PNG, or JPG in
public/.
[!WARNING] Static export means media files must live in
public/or on a trusted CDN.
[!CAUTION] YouTube embeds use
youtube-nocookie.comfor slightly better privacy.
Blockquotes & dividers
"File-based blogs scale down beautifully." — every developer who deleted their CMS
Images
Standard markdown images with optional title as caption:
YouTube embeds
Use the directive syntax with a video ID or full URL:
Or paste a standalone link:
Both render as responsive 16:9 iframes with lazy loading.
Video & audio
Host files in public/blog/media/ then reference them:
::video https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4 "MDN sample — flower.mp4"
::audio https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3 "MDN sample — T-Rex roar"
Local paths work too once you add files:
::video /blog/media/demo.mp4 "My screencast"
::audio /blog/media/episode-01.mp3 "Podcast clip"Footnotes
Footnotes keep citations out of the main flow1 without breaking reading rhythm2.
Quick reference
| Want | Write |
|---|---|
| Cover image | thumbnail: "/path.jpg" |
| YouTube | ::youtube dQw4w9WgXcQ |
| Video file | ::video /blog/media/x.mp4 "Caption" |
| Audio file | ::audio /blog/media/x.mp3 "Caption" |
| Hide draft | published: false |
| Highlight lines | ```ts {2,5-8} ` |
| Filename in code | ```ts title="app/page.tsx" ` |
That covers everything this blog engine supports today. Copy a section, start writing, and ship.
Footnotes
Related
Continue reading
More notes on similar topics.
How to ship a markdown blog with zero database, full SEO, and static export — the same stack powering mahdi.is-a.dev.
- Next.js
- Markdown
How Ken Perlin's gradient noise creates infinite terrain, clouds, and fire — and why Simplex improved it thirty years later.
- Graphics
- Algorithms
A frontend engineer's guide to the architecture behind GPT — self-attention, positional encoding, and the encoder-decoder split.
- ML
- Transformers