Markdown Basics
CelestialDocs uses Markdown for all documentation content. Markdown is a simple, readable format that converts to HTML automatically.
What is Markdown?
Markdown is human-readable text with minimal formatting syntax:
# This is a heading
This is regular text.
**This is bold** and _this is italic_.
Renders as:
- Heading 1
- Regular paragraph
- Bold and italic text
Common Elements
Headings
# Heading 1 (h1)
## Heading 2 (h2)
### Heading 3 (h3)
#### Heading 4 (h4)
##### Heading 5 (h5)
###### Heading 6 (h6)
Best practice: Use one # h1 per page (your title)
Text Formatting
**Bold text** or **bold**
_Italic text_ or _italic_
**_Bold and italic_**
~~Strikethrough~~
`Inline code`
Lists
Unordered:
- Item 1
- Item 2
- Nested item
- Another nested
- Item 3
Ordered:
1. First
2. Second
3. Third
Links
[Link text](https://example.com)
[Link to page](/docs/getting-started/installation)
Images
Recommended: Use relative paths from your content collection


Example using an image from content/docs/assets:

Alternative: Public folder (for shared assets)

Best practices:
- Store images alongside content in
content/docs/assets/for better organization - Always include descriptive alt text for accessibility
- Use relative paths (
../assets/) for collection-specific images - Use absolute paths (
/public-image.jpg) for site-wide assets - Optimize images before uploading (WebP recommended, or compressed JPEGs)
- Typical dimensions: 1200x630 for hero images, 800x400 for content images
Why use content collection assets?
- Images live with your documentation content
- Easier to manage and version control
- Better organization for multi-collection sites
- Clearer ownership and scope
Code Blocks
Inline:
Use `npm install` to install packages
Block:
```javascript
function hello() {
console.log("Hello world");
}
```
Quotes
> This is a blockquote
>
> It can span multiple lines
Tables
| Column 1 | Column 2 |
| -------- | -------- |
| Cell 1 | Cell 2 |
| Cell 3 | Cell 4 |
Frontmatter
Every page starts with YAML frontmatter:
---
title: "Page Title"
description: "Page description for SEO"
---
This comes before any content.
Horizontal Rules
---
or
---
or
---
Next Steps
Learn advanced features: