Manage different types of content in your Astrolock site
Content collections organize your content by type. Each collection has its own folder, settings, and features.
Collection Types
Info
All collections share core features like categories, tags, and author attribution. Each type adds specialized fields. Find out more in Managing Collections page.
| Type | Best For | Examples |
|---|---|---|
| Text | Written content | Blog posts, articles, news |
| Audio | Sound files | Podcasts, music, DJ mixes |
| Images | Visual galleries | Photography, portfolios |
| Video | Video content | Tutorials, vlogs |
Quick Start
Create a New Collection
Edit .astrolock/astrolock.yaml and add your collection:
collections:
blog:
displayName: "Blog"
contentType: "text"
See Managing Collections for details.
Add Content to a Collection
astrolock content blog "My New Post"
How Collections Work
Each collection has:
- Content folder -
content/{collection-name}/ - Configuration - Defined in
.astrolock/astrolock.yaml - Public folder -
public/{media-type}/content/{collection}/for media files
collections:
# Your collections
blog:
displayName: "Blog"
contentType: "text"
features:
archive: true
mixes:
displayName: "DJ Mixes"
contentType: "audio"
defaults:
contentExtension: "mp3"See Collections Configuration for all options.
Features Available
| Feature | Description | Enable |
|---|---|---|
| Archive | Browse by year/month | features.archive: true (reference) |
| Index Style | Control index page layout | features.indexStyle (reference) |
| Categories | Group related content | Add to frontmatter (reference) |
| Tags | Keyword labels | Add to frontmatter (reference) |
| Genres | Music-style grouping | Add to frontmatter (reference) |
Next Steps
- Learn about Text Collections for blogs and articles
- Explore Audio Collections for music and podcasts
- Set up Image Collections for galleries
- Create Video Collections for video content
- See Collections Configuration for all options