Updated

This file tests all MDX features and custom plugins used on this site.

Headings Test

H3 Heading

H4 Heading

H5 Heading

Text Formatting

This is bold text and this is italic text. Here’s some inline code.

Internal link stays in same window.

External link opens in new tab automatically1.

Images

Basic image with caption

Test image with caption
This is a test image caption

Image without caption

Test image without caption

Image caption with markdown formatting

Test image
Caption with inline code and bold text

Image caption with math

Test image
The equation E=mc2E = mc^2 demonstrates energy-mass equivalence

Code Blocks

Basic code block

const hello = "world";
console.log(hello);

Code block with filename

app.js
function main() {
  console.log("Hello from app.js");
}

Code block with caption

def fibonacci(n):
    if n <= 1:
        return n
    return fibonacci(n-1) + fibonacci(n-2)
This demonstrates Python syntax highlighting

Code block with both filename and caption

server.ts
import express from 'express';

const app = express();
app.listen(3000);
TypeScript server with Express

Code block caption with markdown formatting

function delay(ms) {
  return new Promise(resolve => setTimeout(resolve, ms));
}
Uses setTimeout and returns a Promise

Code block caption with math

def merge_sort(arr):
    if len(arr) <= 1:
        return arr
    mid = len(arr) // 2
    left = merge_sort(arr[:mid])
    right = merge_sort(arr[mid:])
    return merge(left, right)
Time complexity is O(nlogn)O(n log n) for merge sort

Code block with meta attributes

npm install
npm run build

Lists

Unordered list

  • Item 1
  • Item 2
    • Nested item 2.1
    • Nested item 2.2
  • Item 3

Ordered list

  1. First item
  2. Second item
  3. Third item

Horizontal Rule

The horizontal rule below renders as three centered dots:


Text continues after the rule.

Math (KaTeX)

Inline math: E=mc2E = mc^2

Block math:

ex2dx=π\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}

Blockquotes

This is a blockquote. It can span multiple lines.

And multiple paragraphs.

Tables (GFM)

Header 1Header 2Header 3
Cell 1Cell 2Cell 3
Cell 4Cell 5Cell 6

Task Lists (GFM)

  • Completed task
  • Incomplete task
  • Another task

Strikethrough (GFM)

This text is struck through

SVG Images

SVG test

HTML in MDX

Custom HTML content

Complex Code Example

complex-example.js
async function fetchData(url) {
  try {
    const response = await fetch(url);
    const data = await response.json();
    return data;
  } catch (error) {
    console.error('Failed to fetch:', error);
    throw error;
  }
}

// Usage
fetchData('https://api.example.com/data')
  .then(data => console.log(data))
  .catch(err => console.error(err));
Demonstrates async/await with error handling

Edge Cases

Empty code block

Very long filename

this-is-a-very-long-filename-that-might-break-the-layout.js
const test = true;

Special characters in caption

print("Hello, world!")
Testing special characters in captions

Indented Paragraphs

Regular paragraph text here.

This paragraph is indented by 2rem (indent-8) for paragraph continuation.

Back to regular paragraph.

Footnotes

This is a sentence with a footnote reference2.

You can reference the same footnote multiple times2.

Here’s a more complex footnote with detailed information3.

The algorithm has a time complexity of O(n2)O(n^2)4.


Conclusion

This fixture tests all major features including:

  • ✅ Image captions with markdown and KaTeX
  • ✅ Code captions with markdown and KaTeX
  • ✅ Footnotes with back-references
  • ✅ External links opening in new tabs
  • ✅ Indented paragraphs
  • ✅ Horizontal rules as three dots
  • ✅ Math rendering (inline and block)
  • ✅ All standard markdown features

This should build without errors.

Footnotes

  1. External links (starting with http:// or https://) automatically get target="_blank" and rel="noopener noreferrer" for security.

  2. This is a simple footnote with basic information. 2

  3. This is a longer footnote with multiple paragraphs.

    The second paragraph is indented with 4 spaces. This allows you to write detailed explanations.

    You can even include inline code, bold text, and italic text here!

  4. Big O notation describes the upper bound of time complexity. Common complexities include O(1)O(1), O(logn)O(log n), O(n)O(n), O(nlogn)O(n log n), and O(n2)O(n^2).

Well, now what?

You can navigate to more writings from here. Connect with me on LinkedIn for a chat.