DeDeLab
February 25, 2026
DeDeLab Blog Formatting Tutorial: Markdown and MDX Style Guide
A practical guide that shows how to write blog posts in this project, with copy-ready examples for markdown, code blocks, images, Alert, and SpecialLink.

This article is a live format playground. You can copy any snippet below and use it directly in your own post.
1) Minimum frontmatter you should always provide
Use this as your default template:
---
title: "Your Post Title"
description: "One sentence summary for card preview and SEO."
date: "2026-02-25"
category: "Blog"
tags: ["Tag1", "Tag2"]
featuredImage: "./cover.png"
pinned: false
---Why these fields matter
titleanddescriptionare used in post cards and SEO.datecontrols sort order.categoryis used for list grouping.tagspowers Topics pages.featuredImageis used for list thumbnail and top cover.pinnedcontrols the pinned stories panel.
2) Core markdown blocks
Paragraph and inline code
Use inline code like npm run develop for commands and config keys.
Quote
Keep your writing practical, testable, and easy to copy.
List
- Keep one point per bullet.
- Prefer short lines for scanning.
- Use examples whenever possible.
Divider
Add a divider between major sections:
---3) Code blocks
This project supports Prism highlighting and line numbers.
export function createPostMeta() {
return {
category: "Blog",
pinned: false,
};
}def normalize_tags(tags):
return [tag.strip() for tag in tags if tag]npm run develop
npm run build4) Image and caption
Local image example:
Remote image example also works:
5) Highlight and links
Use
mark
to emphasize key text.Regular markdown link: Open the Gatsby docs
Raw HTML anchor also works:
Open MDX docs6) MDX custom component: Alert
Use this for warnings, tips, and important notes.
Copy-ready snippet
<Alert severity="info">
Put your message here.
</Alert>7) MDX custom component: SpecialLink
Use this when you want a rich link card (video/demo/repo).
Sample Video Link Card
youtube.com
Copy-ready snippet
<SpecialLink
href={"https://example.com"}
title={"Card title"}
description={"Card summary"}
site={"example.com"}
image={"https://example.com/cover.png"}
/>8) Optional advanced layout with Box and Typography
You can also use MUI wrappers that are mapped in this project:
<Box sx={{ border: "1px solid", borderColor: "divider", borderRadius: "8px", p: 2, my: 2 }}>
<Typography sx={{ fontWeight: 700 }}>
Custom callout with Box + Typography
</Typography>
<Typography sx={{ color: "text.secondary" }}>
Useful for custom layout blocks without creating a new React component.
</Typography>
</Box>9) Quick publishing checklist
- Put your file in
content/posts/<slug>/index.mdx. - Fill frontmatter fields first.
- Verify
featuredImagepath exists. - Run
npm run developfor preview. - Run
npm run buildbefore pushing.
If you follow this tutorial format, your post should render correctly in list pages, post detail pages, Topics, and pinned areas.