This post is a living reference for every feature my blog supports. Use it as a copy-paste starting point when writing new posts.
1. Headings & Text
H1 Heading
H2 Heading
H3 Heading
H4 Heading
You can write bold, italic, strikethrough, inline code, and hyperlinks.
This is a blockquote. You can use it for notable quotes or references.
2. Callouts
Callouts are the most powerful way to highlight information. All variants are shown below.
Note
This is a note callout. Great for background context.
Tip
This is a tip callout. Use it for helpful shortcuts or suggestions.
Warning
This is a warning callout. Ideal for prereqs or prerequisites.
Danger
This is a danger callout. Use for breaking changes or serious warnings.
Important
This is an important callout. For must-know information.
Definition (Graph)
A graph is an ordered pair where is a set of vertices and is a set of edges connecting them.
Theorem (Pythagorean Theorem)
For a right-angled triangle:
Proof
Given , : . Therefore .
Example (Practical Usage)
When modeling a social network, each user is a vertex and each friendship is an edge.
Summary
- Callouts support many variants:
note,tip,warning,danger,important,definition,theorem,proof,example,summary,recall,intuition,remark,fact,lemma,corollary,axiom,conjecture,notation,proposition,exercise,problem,answer,solution. - They can be nested.
- They accept a
titleprop and adefaultOpen={false}prop to collapse by default.
Warning (Collapsible Example)
This callout is open by default. The one below is collapsed.
Notation (Math Symbols)
- — Summation
- — For all
- — There exists
- — Element of
- — Subset of or equal to
3. Sidenotes
Sidenotes appear as a numbered inline marker. On desktop, they float in the right margin.
This is a sentence with a sidenote 1 embedded inline.
You can have multiple 2 sidenotes in the same paragraph.
4. Code Blocks
Inline Code
Use backticks for inline code like const x = 42.
Fenced Code Block
def fibonacci(n: int) -> int: """Returns the nth Fibonacci number.""" if n <= 1: return n return fibonacci(n - 1) + fibonacci(n - 2)
print(fibonacci(10)) # 55// TypeScript exampleinterface BlogPost { title: string date: Date tags: string[] draft?: boolean}
const post: BlogPost = { title: "My First Post", date: new Date(), tags: ["tech", "writing"],}# Terminal commandsnpm run devgit add .git commit -m "feat: add new blog post"git push origin main5. Math (KaTeX)
Inline math uses single dollar signs:
Display math uses triple backtick with math or double dollar signs:
A more complex example:
6. Tables
| Feature | Syntax | Notes |
|---|---|---|
| Bold | **text** | Also __text__ |
| Italic | *text* | Also _text_ |
| Code | `code` | For inline snippets |
| Link | [label](url) | Opens in new tab |
| Math | $formula$ | Powered by KaTeX |
7. X Embeds
Dynamic Embed (auto-fetched via react-tweet)
Use <TweetEmbed> with the tweet’s numeric ID from its URL:
8. Challenge Block
The <Challenge> component is great for CTF writeups or problem sets.
- Author
- Vatsal Sharma
- Categories
-
Graph Theory Algorithms - Points
- 350
- Solves
- 42
- Files
- graph.py README.md
- Remote
-
nc challenge.vatsal.ca 1337 - Flag
-
flag{m4x_w31ght_m4tch1ng}
Given a weighted bipartite graph , find the maximum weight matching such that no two edges in share a vertex. Return .
9. Country Flags
Inline country flags using ISO 3166-1 alpha-2 codes:
- Canada:

- United States:

- United Kingdom:

- Japan:

- India:

10. First Subpost Link
Use <FirstSubpost> to link readers to the first entry in a multi-part series:
11. Emojis
Emoji shortcodes are supported via remark-emoji:
🚀 🔥 💯 ✨ 🎉 🧠 📈
12. Lists
Unordered
- Item one
- Item two
- Nested item
- Another nested item
- Item three
Ordered
- First step
- Second step
- Sub-step A
- Sub-step B
- Third step
Task Lists
- Completed task
- Another done task
- Pending task
13. HTML Elements
You can use raw HTML in MDX for things Markdown doesn’t support:
- Underlined text
- Highlighted text
- Press Ctrl + C to copy
- HTML is the standard markup language
- superscript and subscript
-
Click to expand
This is hidden content in a native HTML details/summary block.
14. Images
Place images in your post’s assets/ folder and reference them in frontmatter or inline:

Quick Reference
| Component | Import | Usage |
|---|---|---|
Callout | @/components/mdx/Callout.astro | <Callout variant="note">...</Callout> |
Sidenote | @/components/mdx/Sidenote.astro | <Sidenote number="1">...</Sidenote> |
TweetEmbed | @/components/mdx/TweetEmbed.astro | <TweetEmbed id="TWEET_ID" /> |
StaticTweet | @/components/mdx/StaticTweet.astro | <StaticTweet avatar="..." username="..." ...> |
Challenge | @/components/mdx/Challenge.astro | <Challenge title="..." ...>...</Challenge> |
CountryFlag | @/components/mdx/CountryFlag.astro | <CountryFlag country="ca" /> |
FirstSubpost | @/components/mdx/FirstSubpost.astro | <FirstSubpost title="..." href="..." /> |
Admonition | @/components/mdx/Admonition.astro | <Admonition variant="tip">...</Admonition> |
15. Admonitions (Obsidian-style)
Admonitions are styled callout blocks inspired by Obsidian. All 10 variants:
A brief record of something written down to assist the memory or for future reference.
A small piece of useful advice about something practical.
Having great value or influence; very necessary. Something that has great influence or authority.
Something that tells you to be careful or tells you about something, usually something bad, before it happens.
Great care, because of possible danger; to warn somebody not to do something.
For the conclusion and all the TLDRs. Great at the end of long posts.
A sentence in an interrogative form, addressed to someone in order to get information in reply.
A criticism or interpretation, often by implication or suggestion; to write explanatory or critical notes upon a text.
To repeat a passage, phrase, etc., from a book, speech, or the like, as by way of authority, illustration, etc.
Manuals, listings, diagrams, and other hard- or soft-copy written and graphic materials that describe the use, operation, maintenance, or design of software or hardware.
Admonitions fully support code blocks inside them:
You can sort a list of tuples by any key using a lambda:
data = [(1, 'z'), (3, 'b'), (2, 'a')]sorted_data = sorted(data, key=lambda x: x[1])print(sorted_data) # [(2, 'a'), (3, 'b'), (1, 'z')]