title: Markdown Example description: A simple example of a Markdown blog post. category: Example slug: ‘19981207’ published: 2025-01-01T12:00:00+08:00 tags:
- markdown
- example
Here is an example of a Markdown blog post.
Heading Level 1 (I suggest not to use this level)
Heading Level 1 is reserved for the post title, so you should start with Heading Level 2.
:::collapse{title=“Or”}
You can uncomment import remarkHeadingShift from './src/plugins/remark-heading-shift.mjs';
on the top of astro.config.mjs and then uncomment the first line of the remarkPlugins array.
After that, you can use Heading Level 1 as a regular heading in your blog posts.
// astro.config.mjs
// import { remarkHeadingShift } from './src/plugins/remark-heading-shift.ts';
import { remarkHeadingShift } from './src/plugins/remark-heading-shift.ts';
export default defineConfig({
markdown: {
remarkPlugins: [
// remarkHeadingShift,
remarkHeadingShift,
// Other plugins
],
},
});
:::
Heading Level 2
You can use GitHub Flavored Markdown to format your blog posts. For example, you can use bold,
italic and strikethrough text, create a link or just write a raw URL
like https://example.com, and add images:
![]()
Common Markdown features like:
- Lists
- Nested lists
- More nested lists
- More lists
- And more lists
- Numbered lists
- More numbered Lists
- Nested lists
- More nested lists
- Nested Numbered lists
- And more numbered lists
- Another nested numbered list
- More nested numbered lists
Or a blockquote.
You can use ` to create code line like this, or
```markdown
use triple backticks to create code blocks.
```
[!NOTE] Astral Halo use Expressive Code for code block, check their document for more information.
$\LaTeX$ formulas are also supported, inline formula like $e^{i\pi} + 1 = 0$ or block formula like:
$$ \int_{-\infty}^{+\infty} e^{-x^2} \mathrm{d}x = \sqrt{\pi} $$
Heading Level 3
Other GitHub Flavored Markdown features include:
- Task lists
- More task lists
- And more task lists
And tables:
| Header 1 | Header 2 |
|---|---|
| Row 1 | Row 1 |
| Row 2 | Row 2 |
| A looooooooooong row | A looooooooooong row |
| A very loooooooooooooooooooooooooooooooooooooooooooooooooong row |
You can also add footnotes[^1] or reference links.
[^1]: This is a footnote.
Obsidian callouts is also supported:
[!note] Lorem ipsum dolor sit amet
[!abstract] With Title Lorem ipsum dolor sit amet
[!info]- Default Collapsed Lorem ipsum dolor sit amet
[!todo]+ Default Expanded Lorem ipsum dolor sit amet
[!tip] Lorem ipsum dolor sit amet
[!success] Lorem ipsum dolor sit amet
[!question] Lorem ipsum dolor sit amet
[!warning] Lorem ipsum dolor sit amet
[!failure] Lorem ipsum dolor sit amet
[!danger] Lorem ipsum dolor sit amet
[!bug] Lorem ipsum dolor sit amet
[!example] Lorem ipsum dolor sit amet
[!quote] Lorem ipsum dolor sit amet
And that’s it!
I Think You Want to Have a Look at Heading Level 4
Bidirectional article links are also supported, you can use [[slug]] to create a link to
another article like [[posts/create-custom-page/index#Introduction|create custom page]] or [[manual]].