Person's hands at laptop computer
Published: 1/5/2024

Hello Astro World

This is the first post of the blog.

I have been learning Astro πŸš€ and decided to build something using the Content Collections feature of Astro.

Technology used on this blog

Content Collections

I also used Astro’s Content Collections It allows you to setup specific directories where you can store your .md or .mdx files (content).

Directory setup

For the blog I used the following folder structure:

/src/
└── content/
    β”œβ”€β”€ posts/
    β”‚   β”œβ”€β”€ post1.mdx
    β”‚   β”œβ”€β”€ post2.mdx
    β”‚   └── etc.mdx
    └── images/
        β”œβ”€β”€ image1.png
        β”œβ”€β”€ image2.png
        └── etc.png

There is a bit of setup to map hrefs to the right location since I wanted the main blog path to be /blog/slug, so a lot of /blog/${post.slug} template literals work to get the links to all work like I wanted them.

All in all, I think it was a positive experience and really like Astro Here’s to more building…