You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Files and directories prefixed with `_` are excluded from routing. Use them for drafts, shared assets, or internal-only content.
48
49
49
50
## Frontmatter
@@ -71,7 +72,8 @@ Here is the list of frontmatter properties for each post:
71
72
72
73
</ResponsiveTable>
73
74
74
-
> Tip! You can get an ISO 8601 datetime by running `new Date().toISOString()` in the console.
75
+
> [!TIP]
76
+
> You can get an ISO 8601 datetime by running `new Date().toISOString()` in the console.
75
77
76
78
Only `title`, `description`, and `pubDatetime` fields in frontmatter must be specified.
77
79
@@ -116,6 +118,65 @@ AstroPaper includes workspace snippets to speed up creating new posts:
116
118
117
119
These snippets live in `.vscode/astro-paper.code-snippets`. If you use VS Code (or Cursor), they should be available automatically when you open the workspace.
118
120
121
+
## Callouts
122
+
123
+
AstroPaper started supporting callouts in AstroPaper v6.1. They use a simple blockquote syntax powered by `rehype-callouts` (Obsidian theme).
124
+
125
+
Here are the most commonly used types:
126
+
127
+
> [!NOTE]
128
+
> Supplementary information the reader should be aware of.
129
+
130
+
> [!TIP]
131
+
> Helpful advice, shortcuts, or best practices.
132
+
133
+
> [!WARNING]
134
+
> Something that could go wrong or have unintended consequences.
135
+
136
+
> [!DANGER]
137
+
> Serious risk of failure, data loss, or incorrect behavior.
138
+
139
+
> [!INFO]
140
+
> Neutral informational context — less urgent than a note.
141
+
142
+
> [!SUCCESS]
143
+
> Confirmation that something worked or is correct.
144
+
145
+
The full list of supported types includes: `NOTE`, `ABSTRACT`, `INFO`, `TODO`, `TIP`, `SUCCESS`, `QUESTION`, `WARNING`, `FAILURE`, `DANGER`, `BUG`, `EXAMPLE`, `QUOTE` — each with its own icon and color. Many types also accept aliases (e.g. `HINT` and `IMPORTANT` for `TIP`, `CAUTION` for `WARNING`). See the [rehype-callouts docs](https://github.com/lin-stephanie/rehype-callouts) for the complete reference.
146
+
147
+
### Collapsible callouts
148
+
149
+
Add `-` after the type to make the callout collapsed by default, or `+` to make it expanded but collapsible:
150
+
151
+
> [!WARNING]- Read before proceeding
152
+
> This content is hidden until the reader expands it. Useful for long caveats that would otherwise interrupt the flow.
153
+
154
+
> [!TIP]+ Pro tip (expanded by default)
155
+
> This starts open but can be collapsed. Great for optional detail you still want visible on first load.
156
+
157
+
### Custom titles
158
+
159
+
Replace the default type label with any title you like by adding text after the type:
160
+
161
+
> [!NOTE] Did you know?
162
+
> The text after the type becomes the callout's heading. Leave it out and the type name is used automatically.
163
+
164
+
### Syntax summary
165
+
166
+
```md
167
+
> [!NOTE]
168
+
> Supplementary information.
169
+
170
+
> [!WARNING]- Collapsed by default
171
+
> Hidden until expanded.
172
+
173
+
> [!TIP]+ Expanded, but collapsible
174
+
> Starts open.
175
+
176
+
> [!DANGER] Custom title
177
+
> Replaces the default heading.
178
+
```
179
+
119
180
## Adding table of contents
120
181
121
182
By default, a post does not include any table of contents (TOC). To include one, write `Table of contents` as an h2 heading (`##` in Markdown) and place it where you want it to appear:
@@ -181,7 +242,8 @@ export default defineConfig({
181
242
182
243
Here are two methods for storing images and using them inside a markdown file.
183
244
184
-
> Note: If you need to style optimized images in markdown, you should [use MDX](https://docs.astro.build/en/guides/images/#images-in-mdx-files).
245
+
> [!IMPORTANT]
246
+
> If you need to style optimized images in markdown, you should [use MDX](https://docs.astro.build/en/guides/images/#images-in-mdx-files).
185
247
186
248
### Inside `src/assets/` directory (recommended)
187
249
@@ -203,6 +265,7 @@ Example: suppose you want to display `example.jpg` whose path is `src/assets/ima
203
265
<!-- ^^ This is wrong -->
204
266
```
205
267
268
+
> [!TIP]
206
269
> Technically, you can store images inside any directory under `src`. `src/assets` is just a recommendation.
207
270
208
271
### Inside `public/` directory
@@ -225,7 +288,8 @@ Example: assume `example.jpg` is located at `public/assets/images/example.jpg`.
225
288
226
289
### Image compression
227
290
228
-
When putting images in a blog post (especially those in the `public/` directory), it is recommended to compress them. This will affect the overall performance of the website.
291
+
> [!WARNING]
292
+
> When putting images in a blog post (especially those in the `public/` directory), compress them first. Unoptimized images significantly hurt page performance.
The default OG image will be used if a post does not specify one. Though not required, an OG image relevant to the post should be specified in the frontmatter. The recommended size for OG images is **_1200 X 640_** px.
238
302
303
+
> [!TIP]
239
304
> Since AstroPaper v1.4.0, OG images are generated automatically if not specified. Check out [the announcement](https://astro-paper.pages.dev/posts/dynamic-og-image-generation-in-astropaper-blog-posts/).
@@ -49,9 +49,8 @@ Dynamic OG images include _the blog post title_, _author name_, and _site title_
49
49
50
50
### Issue with Non-Latin Characters
51
51
52
-
Titles with non-latin characters won't display properly out of the box. In AstroPaper v6, dynamic OG images load font files from Astro's **Fonts** configuration (`astro.config.ts`) and register them with Satori.
53
-
54
-
To fix missing glyphs, switch the Google font family to one that covers your writing system, and make sure you include **both**`400` and `700` weights (Satori uses separate buffers for regular + bold).
52
+
> [!CAUTION]
53
+
> Titles with non-latin characters won't display properly out of the box. Switch the Google font family to one that covers your writing system, and include **both**`400` and `700` weights — Satori uses separate buffers for regular and bold, so missing either causes mismatched rendering.
@@ -79,15 +78,8 @@ If you change `cssVariable`, also update the matching key in:
79
78
80
79
> Check out [this PR](https://github.com/satnaing/astro-paper/pull/318) for more info.
81
80
82
-
## Trade-off
83
-
84
-
While this is a nice feature to have, there's still a trade-off: AstroPaper generates one PNG per eligible post at build time (when og image is not specified in the frontmatter), so total build time grows with content volume.
85
-
86
-
In AstroPaper v6, OG image generation is significantly faster (PR [#632](https://github.com/satnaing/astro-paper/pull/632)) than earlier implementations, so the per-image overhead is much lower in practice. If you still want to minimize build time on very large sites, you can disable it by setting `features.dynamicOgImage: false` in `astro-paper.config.ts` (and provide per-post `ogImage` files instead).
87
-
88
-
## Limitations
89
-
90
-
At the time of writing this, [Satori](https://github.com/vercel/satori) is fairly new and has not reached major release yet. So, there are still some limitations to this dynamic OG image feature.
91
-
92
-
- RTL languages are not supported yet.
93
-
-[Using emoji](https://github.com/vercel/satori#emojis) in the title might be a little bit tricky.
81
+
> [!WARNING] Caveats
82
+
>
83
+
> -**Build time** grows with content volume — one PNG per eligible post is generated at build time. Generation is faster in v6 (PR [#632](https://github.com/satnaing/astro-paper/pull/632)), but on very large sites you can disable it with `features.dynamicOgImage: false` in `astro-paper.config.ts`.
84
+
> -**RTL languages** are not supported yet.
85
+
> -**Emoji** in titles can be tricky — some may not render correctly.
Copy file name to clipboardExpand all lines: src/content/posts/how-to-configure-astropaper-theme.mdx
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
author: Sat Naing
3
3
pubDatetime: 2022-09-23T04:58:53Z
4
-
modDatetime: 2026-05-17T05:50:08.212Z
4
+
modDatetime: 2026-06-03T00:00:00.000Z
5
5
title: How to configure AstroPaper theme
6
6
slug: how-to-configure-astropaper-theme
7
7
featured: true
@@ -296,7 +296,8 @@ import { Font } from "astro:assets";
296
296
297
297
The `--font-app` variable is used throughout the theme via the `font-app` Tailwind utility class, so updating this single variable applies your custom font everywhere.
298
298
299
-
> **Note**: Make sure the font name matches exactly as it appears on [Google Fonts](https://fonts.google.com). For other font providers or local fonts, refer to the [Astro Fonts documentation](https://docs.astro.build/en/guides/fonts/).
299
+
> [!WARNING]
300
+
> Make sure the font name matches exactly as it appears on [Google Fonts](https://fonts.google.com). For other font providers or local fonts, refer to the [Astro Fonts documentation](https://docs.astro.build/en/guides/fonts/).
0 commit comments