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
alt="Free Classic wooden desk with writing materials, vintage clock, and a leather bag. Stock Photo"
22
+
/>
23
+
<figcaptionclass="text-center">
24
+
Photo by <ahref="https://www.pexels.com/photo/brown-wooden-desk-159618/">Pixabay</a>
25
+
</figcaption>
26
+
</figure>
27
+
18
28
## Table of contents
19
29
30
+
## Creating a Blog Post
31
+
32
+
To write a new blog post, create a markdown file inside the `src/data/blog/` directory.
33
+
34
+
> Prior to AstroPaper v5.1.0, all blog posts had to be in `src/data/blog/`, meaning you couldn't organize them into subdirectories.
35
+
36
+
Starting from AstroPaper v5.1.0, you can now organize blog posts into subdirectories, making it easier to manage your content.
37
+
38
+
For example, if you want to group posts under `2025`, you can place them in `src/data/blog/2025/`. This also affects the post URL, so `src/data/blog/2025/example-post.md` will be available at `/posts/2025/example-post`.
39
+
40
+
If you don’t want subdirectories to affect the post URL, just prefix the folder name with an underscore `_`.
> 💡 Tip: You can override a blog post’s slug in the frontmatter as well. See the next section for more details.
52
+
53
+
If the subdirectory URL doesn’t appear in the build output, remove node_modules, reinstall packages, and then rebuild.
54
+
20
55
## Frontmatter
21
56
22
57
Frontmatter is the main place to store some important information about the blog post (article). Frontmatter lies at the top of the article and is written in YAML format. Read more about frontmatter and its usage in [astro documentation](https://docs.astro.build/en/guides/markdown-content/).
0 commit comments