Skip to main content
Mountains and water.

Formatting Reference

7 min 1,540 words

This post demonstrates all the markdown, extended markdown, and other embed features available in Astro Modular. Use this as both a reference guide and a showcase of what’s possible.

Basic Formatting

Text Emphasis

  • Bold text using **bold** or __bold__
  • Italic text using *italic* or _italic_
  • Bold and italic using ***text***
  • Strikethrough using ~~text~~
  • Highlighted text using ==text==
  • Inline code using backticks

Headings

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6

Callouts and Admonitions

Our theme supports Obsidian-style callouts with proper icons and styling. Each callout type has its own color scheme and matching Lucide icon.

Basic Callouts

Note

This is a note callout. Use it for general information that readers should be aware of.

Tip

This is a tip callout. Perfect for helpful suggestions and best practices.

Important

This is an important callout. Use it to highlight critical information.

Warning

This is a warning callout. Use it to alert readers about potential issues.

Caution

This is a caution callout. Use it for dangerous or risky situations.

Custom Titles

Custom Note Title

You can customize the title of any callout by adding text after the callout type.

Pro Tip

Custom titles help you provide more context for your callouts.

Collapsible Callouts

You can make callouts collapsible by adding + (expanded by default) or - (collapsed by default) after the callout type:

Expanded by Default

This callout starts expanded and can be collapsed by clicking the toggle button or the title.

Collapsed by Default
Collapsible with Custom Title

You can combine collapsible functionality with custom titles for more control over your content organization.

Extended Callout Types

Info

Info callouts provide additional context or details.

Success

Success callouts highlight positive outcomes or achievements.

Question

Question callouts can be used to pose questions or highlight areas of uncertainty.

Example

Example callouts are perfect for showcasing code examples or demonstrations.

Quote

Quote callouts can be used to highlight important quotes or references.

Media Content

Images

Single Image With Caption

Mountains Photo by Antoine Rault on Unsplash

Multiple Image Layouts

This theme automatically arranges consecutive images in responsive grid layouts based on the number of images. Images can be placed together without empty lines between them to create these layouts.

Two Images Side by Side

Mountain landscape Ocean view

Three Images in a Row

Forest path Desert sunset City skyline

Four Images in a Row

Winter landscape Spring flowers Summer beach Autumn leaves

How to Use Multiple Images / Gallery

Simply place multiple images together without empty lines between them:

![Image 1](image1.jpg)
![Image 2](image2.jpg)
![Image 3](image3.jpg)

On mobile devices, all layouts switch to a single column for better readability.

Video Files

Video files are embedded as HTML5 video players with controls and responsive design.

YouTube Videos

YouTube videos are automatically embedded with responsive design and optimized settings.

Audio Files

Audio files are embedded as HTML5 audio players with controls and filename display.

PDF Documents

document.pdf Download PDF

PDFs are embedded as inline viewers with download links.

Use ![[attachments/document.pdf#page=3]] to select a specific PDF page to display.

Twitter/X Posts

Twitter posts are embedded with theme-aware styling that matches your site’s light/dark mode.

Buttons

These buttons use your existing color palette and adapt perfectly to light/dark themes. Wrap them in internal or external links if you prefer:

<div class="btn-group-center my-8">
  <a href="https://google.com" class="no-styling no-underline" target="_blank"><button class="btn btn-primary">Primary Action</button></a>
  <a href="https://google.com" class="no-styling no-underline" target="_blank"><button class="btn btn-secondary">Secondary</button></a>
    <a href="https://google.com" class="no-styling no-underline" target="_blank"><button class="btn btn-outline">Outlined</button></a>
      <a href="https://google.com" class="no-styling no-underline" target="_blank"><button class="btn btn-ghost">Subtle</button></a>
</div>

Lists

Unordered Lists

  • First item
  • Second item
    • Nested item
    • Another nested item
      • Deeply nested item
  • Third item

Ordered Lists

  1. First step
  2. Second step
    1. Sub-step A
    2. Sub-step B
      1. Sub-sub-step
  3. Third step

Task Lists

  • Completed task
  • Incomplete task
  • Another completed task
    • Nested incomplete task
    • Nested completed task
  • Final incomplete task

Here’s an external link.

You can create internal links using double brackets (wikilinks) or with standard markdown.

For example: Getting Started or Astro Suite Obsidian Vault Guide (Astro Modular).

For example: [[getting-started|Getting Started]] or [Astro Suite Vault (Modular) Guide](astro-suite-vault-modular-guide).

Here’s an internal link with an anchor: [[sample-folder-based-post/index#Benefits of Folder-Based Approach|Benefits of Folder-Based Approach]]

Here’s a relative link: Mermaid Diagram Test

This is a reference link and this is another reference link.

Linked Images

Mountains

[![Mountains](/posts/attachments/mountains.png)](https://obsidian.md)

Mathematical Notation

This theme includes comprehensive LaTeX math support using KaTeX for fast, client-side rendering. All math works seamlessly in both light and dark themes.

Inline Math

Use single dollar signs for inline math: E=mc2E = mc^2 or 02πdθx+eiθ\int_0^{2\pi} d\theta x+e^{-i\theta}.

Display Math

Use double dollar signs for centered display math:

abcd=adbc\begin{vmatrix}a & b\\ c & d \end{vmatrix}=ad-bc f(x)=x2+3x+2f(x) = x^2 + 3x + 2

Common Mathematical Notation

Fractions and Superscripts

  • Fractions: ab\frac{a}{b}, x2+1x1\frac{x^2 + 1}{x - 1}
  • Superscripts: x2x^2, eiπ+1=0e^{i\pi} + 1 = 0
  • Subscripts: x1x_1, H2OH_2O

Greek Letters

  • α,β,γ,δ,ϵ,θ,λ,μ,π,σ,ϕ,ω\alpha, \beta, \gamma, \delta, \epsilon, \theta, \lambda, \mu, \pi, \sigma, \phi, \omega
  • Γ,Δ,Θ,Λ,Π,Σ,Φ,Ω\Gamma, \Delta, \Theta, \Lambda, \Pi, \Sigma, \Phi, \Omega

Mathematical Symbols

  • Summation: i=1nxi\sum_{i=1}^{n} x_i
  • Product: i=1nxi\prod_{i=1}^{n} x_i
  • Integral: ex2dx=π\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
  • Limit: limx0sinxx=1\lim_{x \to 0} \frac{\sin x}{x} = 1

Matrices and Vectors

(abcd)(xy)=(ax+bycx+dy)\begin{pmatrix} a & b \\ c & d \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} ax + by \\ cx + dy \end{pmatrix}

Complex Equations

×E=Bt\nabla \times \vec{E} = -\frac{\partial \vec{B}}{\partial t} itΨ(r,t)=H^Ψ(r,t)i\hbar\frac{\partial}{\partial t}\Psi(\vec{r},t) = \hat{H}\Psi(\vec{r},t)

Math in Callouts

Math works perfectly within callouts:

Mathematical Proof

The Pythagorean theorem states that for a right triangle:a2+b2=c2a^2 + b^2 = c^2

Where cc is the hypotenuse and aa and bb are the other two sides.

Integration by Parts

The formula for integration by parts is:udv=uvvdu\int u \, dv = uv - \int v \, du

This is particularly useful for integrals involving products of functions.

Advanced Mathematical Typesetting

Aligned Equations

f(x)=ax2+bx+cf(x)=2ax+bf(x)=2a\begin{align} f(x) &= ax^2 + bx + c \\ f'(x) &= 2ax + b \\ f''(x) &= 2a \end{align}

Cases and Piecewise Functions

f(x)={x2if x0x2if x<0f(x) = \begin{cases} x^2 & \text{if } x \geq 0 \\ -x^2 & \text{if } x < 0 \end{cases}

Set Notation

  • Natural numbers: N={1,2,3,}\mathbb{N} = \{1, 2, 3, \ldots\}
  • Real numbers: R\mathbb{R}
  • Complex numbers: C\mathbb{C}
  • Set union: ABA \cup B
  • Set intersection: ABA \cap B
  • Subset: ABA \subseteq B

Math with Text

You can mix math with regular text seamlessly. For example, the quadratic formula is x=12x = \frac{1}{2}, which gives us the roots of any quadratic equation ax2+bx+c=0ax^2 + bx + c = 0.

Obsidian Compatibility

All math notation works identically in Obsidian and your published blog:

  • Inline math: $...$ syntax
  • Display math: $$...$$ syntax
  • LaTeX commands: Full support for standard LaTeX math commands
  • Greek letters: Use \alpha, \beta, etc.
  • Symbols: Use \sum, \int, \infty, etc.

Code Blocks

Inline Code

Use const variable = 'value' for inline code snippets.

JavaScript

function greetUser(name) {
  console.log(`Hello, ${name}!`);
  return `Welcome to our blog, ${name}`;
}

const user = "Developer";
greetUser(user);

Python

def calculate_fibonacci(n):
    """Calculate the nth Fibonacci number."""
    if n <= 1:
        return n
    return calculate_fibonacci(n-1) + calculate_fibonacci(n-2)

# Example usage
for i in range(10):
    print(f"F({i}) = {calculate_fibonacci(i)}")

CSS

.button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  color: white;
  padding: 12px 24px;
  transition: transform 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

Bash/Shell

#!/bin/bash
echo "Setting up development environment..."

# Install dependencies
npm install

# Start development server
npm run dev

echo "Development server started on http://localhost:3000"

Tables

Basic Tables

FeatureSupportedNotes
MarkdownFull CommonMark support
WikilinksObsidian-style double brackets
CalloutsMultiple types with icons
MathLaTeX math with KaTeX rendering
DiagramsMermaid diagram support

Advanced Tables

LanguageUse CasePerformanceLearning Curve
JavaScriptWeb Development⭐⭐⭐⭐Easy
PythonData Science⭐⭐⭐Easy
RustSystems Programming⭐⭐⭐⭐⭐Hard
GoBackend Services⭐⭐⭐⭐Medium

Blockquotes

Simple Quotes

The best way to predict the future is to invent it. — Alan Kay

Nested Quotes

This is a top-level quote.

This is a nested quote within the first quote.

And this is a quote nested even deeper.

Back to the top level.

Horizontal Rules

You can create horizontal rules using three dashes:


Or three asterisks:


Or three underscores:


Keyboard Shortcuts

Press Ctrl + C to copy and Ctrl + V to paste.

Use Cmd + K to open the command palette.

Special Characters and Symbols

  • Copyright: ©
  • Trademark: ™
  • Registered: ®
  • Arrows: ← ↑ → ↓ ↔ ↕
  • Symbols: ★ ☆ ♠ ♣ ♥ ♦
  • Currency: $ € £ ¥

HTML Elements

Sometimes you need to use HTML for more complex formatting:

Click to expand

This content is hidden by default and can be expanded by clicking the summary.

Small text for fine print

Works with Obsidian

All of these formatting options should also appear in Obsidian, with some differences depending on the theme you use.

Quick Reference

  • Bold: **text** or __text__
  • Italic: *text* or _text_
  • Code: `code`
  • Highlight: ==text==
  • Links: [text](url) or [[wikilink]]
  • Images: ![alt](url)
  • Lists: - or 1. for ordered
  • Tasks: - [ ] and - [x]
  • Tables: Use | to separate columns
  • Quotes: Start lines with >
  • Callouts: > [!TYPE]
  • Horizontal rule: ---

Happy writing!

Getting Started

...## Next Steps 1. **Customize** `src/config.ts` 2. **Write** your first post 3. **Explore** [[Formatting Reference]] 4. **Set up** Obsidian vault workflow 5. **Deploy** and share Your modular Astro blog is ready...

Referenced in this post