MDX Demo
This is a demo of MDX rendering on my site. MDX allows you to use React components in your Markdown!
Interactive Components
Here’s a simple counter component:
Count: 0
Math Support
MDX also supports math equations:
Inline math:
Block math:
Code Highlighting
JavaScript
function hello() {
console.log("Hello, world!");
// This is a comment
const greeting = "Hello";
const name = "World";
return `${greeting}, ${name}!`;
}
TypeScript
interface User {
id: number;
name: string;
email: string;
}
function getUser(id: number): Promise<User> {
return fetch(`/api/users/${id}`)
.then(response => {
if (!response.ok) {
throw new Error('User not found');
}
return response.json();
});
}
Python
def fibonacci(n):
"""Generate the Fibonacci sequence up to n"""
a, b = 0, 1
while a < n:
yield a
a, b = b, a + b
# Example usage
for num in fibonacci(100):
print(num)
CSS
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
max-width: 1200px;
margin: 0 auto;
padding: 2rem;
}
@media (max-width: 768px) {
.container {
padding: 1rem;
}
}
Tables
| Name | Age | Occupation |
|---|---|---|
| John | 30 | Developer |
| Jane | 25 | Designer |
Images
You can use Next.js Image component in your MDX files (once properly set up).
Links
Lists
- Item 1
- Item 2
- Nested item 1
- Nested item 2
- Item 3
- First item
- Second item
- Third item
Blockquotes
This is a blockquote.
It can span multiple lines.
Callouts
Here are examples of the different types of callouts available:
This is an information callout with the emoji inline with the text.
This is a warning callout with both a title and emoji.
This is an error callout with a title but no emoji.
This is a success callout with no title and no emoji.
This is a note callout with a custom title and emoji.
This is a tip callout with the emoji inline with the text. Perfect for quick tips!
Horizontal Rule
Colored Text Test
This is red text and blue text.
Text Shadows
This is shadowed text.
Gradient Text
This is gradient text.
Highlighted Text
This is highlighted text.
Rotated Text
This is rotated text.
Text With Borders
This is text with borders.
Outlined Text
This is outlined text.
Animated Text
This is animated text.
Wavy Strikethrough
This is wavy strikethrough text.
Blurred Text
This is blurred text.
Vertical Text
This is vertical text.
Glowing Text
This is glowing text.
Super/Subscript
This is superscript (H2O) and subscript (CO2).
Horizontal Rules
Emphasis
This is bold text
This is bold text
This is italic text
This is italic text
Strikethrough
Blockquotes
Blockquotes can also be nested…
…by using additional greater-than signs right next to each other…
…or with spaces between arrows.
Lists
Unordered
- Create a list by starting a line with
+,-, or* - Sub-lists are made by indenting 2 spaces:
- Marker character change forces new list start:
- Ac tristique libero volutpat at
- Facilisis in pretium nisl aliquet
- Nulla volutpat aliquam velit
- Marker character change forces new list start:
- Very easy!
Ordered
-
Lorem ipsum dolor sit amet
-
Consectetur adipiscing elit
-
Integer molestie lorem at massa
-
You can use sequential numbers…
-
…or keep all the numbers as
1.
Start numbering with offset:
- foo
- bar
Code
Inline code
Indented code
// Some comments line 1 of code line 2 of code line 3 of code
Block code “fences”
Sample text here...
Syntax highlighting
var foo = function (bar) {
return bar++;
};
console.log(foo(5));
Latex
Inline Latex
Inline Latex is rendered inline with the text.
Block Latex
Block Latex is rendered as a block of text.
Fractions
Quadratic Formula
Matrices
Arrays
Tables
| Option | Description |
|---|---|
| data | path to data files to supply the data that will be passed into templates. |
| engine | engine to be used for processing templates. Handlebars is the default. |
| ext | extension to be used for dest files. |
Right aligned columns
| Option | Description |
|---|---|
| data | path to data files to supply the data that will be passed into templates. |
| engine | engine to be used for processing templates. Handlebars is the default. |
| ext | extension to be used for dest files. |
Links
Autoconverted link https://github.com/nodeca/pica (enable linkify to see)
Images

Like links, Images also have a footnote style syntax

With a reference later in the document defining the URL location:
A behind‑the‑scenes look at how my MDX pipeline works, how I render posts, and where performance really matters.
How to set up Caddy as a reverse proxy for your self‑hosted services, with automatic HTTPS, internal domains, and clean URLs.
How to set up single sign‑on for your homelab using Pocket ID, Tinyauth, and a reverse proxy, so you're not juggling dozens of passwords.