Introduction
This is a test post to verify ox-hugo export handles various edge cases. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Code Blocks
Inline code
Use org-hugo-export-to-md to export, or C-c C-e H h for the keybinding.
Source block with language
def hello(name: str) -> str:
"""Greet someone — with "quotes" and 中文."""
return f"Hello, {name}! <script>alert('xss')</script>"
# Edge case: backslash in string
path = "C:\\Users\\test\\file.org"
Source block without language
Just plain text in a source block.
No language specified — should still export fine.
Shell block with special chars
echo "Pipes | and redirects > and && chains"
grep -r "TODO\|DONE" ~/org/notes/ | wc -l
Elisp with org-specific syntax
(setq my-var '("item with 'quotes'" "item with \"escaped quotes\""))
;; Comment with — em dash and … ellipsis
Rich Text Formatting
Emphasis edge cases
Bold text and italic text and underlined text and strikethrough.
Mixed: bold with italic inside it and italic with bold inside.
Emphasis at line boundaries: This whole line is bold
Text with asterisks that should NOT be bold: 5 * 3 = 15, or a*b*c without spaces.
Links
- External link: My Website
- Link with special chars: Query & Fragment
- Bare URL: https://github.com/kaushalmodi/ox-hugo
Lists
Unordered with nesting
- Item one
- Sub-item with bold
- Sub-item with
code- Third level nesting
- Item two
Ordered list
- First item
- Second with a long paragraph that wraps to the next line and keeps going to test how ox-hugo handles paragraph continuation within list items
- Third item
Description list
- Emacs
- The extensible, customizable editor
- Vim
- The ubiquitous text editor
- VS Code
- Microsoft’s electron-based editor
Checklist
- Completed task
- Incomplete task
- [-] Partially done
Tables
| Language | Typing | Year | 中文名 |
|---|---|---|---|
| Python | Dynamic | 1991 | 蟒蛇 |
| Rust | Static | 2010 | 铁锈 |
| Elisp | Dynamic | 1985 | 无 |
| Total | 3 |
Math & Special Characters
LaTeX math
Inline math: \( E = mc^2 \) and \( \sum_{i=1}^{n} x_i \).
Display math:
\begin{equation} \int\_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi} \end{equation}When $a \ne 0$, there are two solutions to $(ax^2 + bx + c = 0)$ and they are
$$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$Unicode & CJK
Chinese: 这是一段中文测试文本,包含标点符号:「引号」、(括号)、——破折号。
Japanese: こんにちは世界
Emoji: 🚀 🎉 ✅ ❌ (if enableEmoji = true in hugo.toml)
Special chars: © ® ™ — – … « » × ÷ ≠ ≤ ≥
HTML entities that might cause issues
Less than: 5 < 10, Greater than: 10 > 5
Ampersand in text: Tom & Jerry, AT&T
Angle brackets in prose: The <div> tag is common in HTML.
Quotes & Admonitions
To be or not to be, that is the question. — William Shakespeare
This quote has multiple paragraphs.
And a third one with formatting.
Images (placeholder paths)
Non-exist images
A reference to a local image that does NOT exist (will fail gracefully):

An image with caption and attributes:
Figure 1: A test diagram showing the architecture
org download images

Heading with code and bold in Title
Content under a heading that has markup in its title.
TODO A heading that looks like a TODO (should it export?)
This heading has a TODO keyword — test how ox-hugo handles it.
DONE A completed heading
Should the CLOSED timestamp appear in export?
Horizontal Rules
Content above.
Content below the horizontal rule.
Outline
Edge cases to verify:
- Special characters in title: quotes, ampersands, colons
- CJK characters mixed with English
- Code blocks with various languages and special chars
- LaTeX math (inline and display)
- Nested lists and description lists
- Tables with CJK content
- Footnotes with formatting
- Image references (even if files don’t exist)
- TODO/DONE headings
- HTML-like content in prose (< > &)
Draft
This is the main content area. The sections above serve as the draft.
Notes
- Test created:
- Purpose: Verify ox-hugo export pipeline with denote blog workflow
- Expected output:
content/en/posts/Edge Case Test Post with Special Chars/index.md