Content Management Guide
Difficulty: Beginner-Intermediate | Time: 10-15 minutes
Everything you need to know about managing content in Astrolock.
Note: This guide uses command-line examples. All commands starting with astrolock assume you have Astrolock installed and are in your project directory.
The Content Lifecycle
Your content goes through these stages:
Create → Edit → Publish → Update → Unpublish or Delete
Let’s walk through each step!
Creating Content
Quick Create
# Create a blog post
astrolock content blog "My Amazing Post"
# Create in a media collection
astrolock content mixes "Summer Vibes Mix"
astrolock content galleries "Vacation Photos"
astrolock content podcasts "Episode 1: Introduction"
What You Get
Astrolock creates two things:
- A markdown file in
content/<collection>/<slug>.md - A placeholder for your media file (if it’s a media collection)
The content starts as a draft (not published).
Example Created File
---
title: "Summer Vibes Mix"
date: 2025-11-06T12:00:00.000Z
draft: true
categories: []
tags: []
---
## Summer Vibes Mix
Add your content here.
Editing Content
Open in Your Editor
astrolock edit mixes/summer-vibes-mix
This opens the file in your text editor.
What You Can Change
In the frontmatter (between the --- marks):
- Title
- Description
- Categories
- Tags
- Draft status
- Date
- Author
In the content (after the ---):
- All your text
- Markdown formatting
- Images
- Links
Markdown Basics
Here are common things you’ll use:
# Big Heading
## Medium Heading
### Small Heading
**bold text**
*italic text*
- Bullet point
- Another point
1. Numbered list
2. Second item
[Link text](https://example.com)

Save and Close
After editing:
- Save the file (
Cmd+SorCtrl+S) - Close the editor
- Your changes are saved!
Publishing Content
Make Content Visible
When you’re ready for people to see your content:
astrolock publish mixes/summer-vibes-mix
This changes draft: true to draft: false.
When to Publish
Publish when:
- ✅ Content is finished
- ✅ You’ve proofread it
- ✅ Media files are uploaded
- ✅ Everything looks good in preview
Preview Before Publishing
Always preview first!
# Start dev server
astrolock write
# Opens at http://localhost:4321
Visit your site in a browser and check:
- Does it look right?
- Are images showing?
- Do links work?
- Is the title correct?
If everything looks good, publish it:
astrolock publish mixes/summer-vibes-mix
astrolock build
Unpublishing Content
Hide Content Temporarily
Need to hide something without deleting it?
astrolock unpublish mixes/summer-vibes-mix
This changes draft: false to draft: true.
The content stays on your computer but won’t show on your website.
When to Unpublish
Good times to unpublish:
- Making major edits
- Seasonal content that’s out of season
- Content needs fact-checking
- Temporarily removing while you decide what to do
Republishing
When you’re ready to show it again:
astrolock publish mixes/summer-vibes-mix
astrolock build
Updating Published Content
Quick Updates
For small changes:
# 1. Edit directly
astrolock edit mixes/summer-vibes-mix
# 2. Save changes
# 3. Rebuild
astrolock build
The updated content appears on your site!
Major Updates
For big changes:
# 1. Unpublish first
astrolock unpublish mixes/summer-vibes-mix
# 2. Make your changes
astrolock edit mixes/summer-vibes-mix
# 3. Preview
astrolock write
# 4. Republish when done
astrolock publish mixes/summer-vibes-mix
# 5. Rebuild
astrolock build
Deleting Content
Permanent Removal
⚠️ Warning: Deletion is permanent!
astrolock delete mixes/old-mix
This removes:
- The markdown file
- All associated media files
Before You Delete
Ask yourself:
- Do I really not need this anymore?
- Should I unpublish instead?
- Have I backed it up?
If you’re not sure, unpublish instead:
astrolock unpublish mixes/old-mix
You can always delete it later.
Safe Deletion
If you must delete:
-
Backup first (if using git):
git add . git commit -m "Backup before deletion" -
Delete:
astrolock delete mixes/old-mix -
Rebuild:
astrolock build
Working with Collections
List Everything
See what you have:
# Show all collections
cat .astrolock/astrolock.yaml
# List items in a collection
astrolock list mixes
astrolock list galleries
astrolock list blog
Add a Collection
Need a new type of content? Edit .astrolock/astrolock.yaml and add your collection:
collections:
podcasts:
displayName: "Podcasts"
contentType: "audio"
defaults:
contentExtension: "mp3"
See the Collections Guide for full configuration options.
Remove a Collection
⚠️ Warning: This will require manually deleting content files!
- Remove the collection from
.astrolock/astrolock.yaml - Delete the content folder:
rm -rf content/{collection-name} - Delete media files:
rm -rf public/{media-type}/content/{collection-name}
Organizing Content
Using Categories
Categories are like folders - broad groups:
---
categories:
- house-music
- techno
---
Best practices:
- Use 1-3 categories per item
- Keep category names consistent
- Think: “What section does this belong in?”
Using Tags
Tags are keywords - specific topics:
---
tags:
- vinyl-only
- live-recording
- warehouse-party
- 2025
---
Best practices:
- Use as many tags as relevant
- Be specific
- Include year tags
- Tag recurring themes
Categories vs Tags
Categories:
- Broad buckets
- Site navigation
- Main organization
Tags:
- Specific details
- Search and filtering
- Cross-referencing
Example:
- Category: “Mixes”
- Tags: “techno”, “vinyl”, “2025”, “berlin”
Bulk Operations
Publishing Many Items
astrolock publish mixes/mix-1
astrolock publish mixes/mix-2
astrolock publish mixes/mix-3
# Rebuild once at the end
astrolock build
Editing Multiple Files
Use your file editor to open multiple files from content/<collection>/.
Finding Content
# List all content
astrolock list mixes
# Or use your file browser
open content/mixes
Typical Workflows
Creating a New DJ Mix
# 1. Create the content
astrolock content mixes "Friday Night Mix"
# 2. Add your MP3 file
# Copy to: public/audio/content/mixes/friday-night-mix.mp3
# 3. Edit the markdown
astrolock edit mixes/friday-night-mix
# 4. Add tracklist, description, tags
# 5. Preview
astrolock write
# 6. Publish when ready
astrolock publish mixes/friday-night-mix
# 7. Build
astrolock build
Importing Photos
# 1. Import from a folder
astrolock import media galleries ~/Pictures/Vacation
# 2. Edit descriptions
astrolock edit galleries/beach-sunset
astrolock edit galleries/mountain-view
# 3. Publish
astrolock publish galleries/beach-sunset
astrolock publish galleries/mountain-view
# 4. Build
astrolock build
Seasonal Content Rotation
# End of summer - hide summer content
astrolock unpublish mixes/summer-mix-1
astrolock unpublish mixes/summer-mix-2
astrolock build
# Start of winter - publish winter content
astrolock publish mixes/winter-mix-1
astrolock publish mixes/winter-mix-2
astrolock build
Spring Cleaning
# Review what you have
astrolock list mixes
# Delete old test content
astrolock delete mixes/test-mix
astrolock delete mixes/old-demo
# Rebuild
astrolock build
Tips for Staying Organized
1. Consistent Naming
Use a pattern for slugs:
2025-11-friday-mixepisode-001-introductiongallery-iceland-2025
2. Regular Reviews
Monthly:
astrolock list mixes
astrolock list galleries
astrolock list blog
Check for:
- Drafts you forgot about
- Old content to delete
- Content that needs updating
3. Use Drafts Wisely
Create content as drafts, publish when ready:
# Create (starts as draft)
astrolock content mixes "New Mix"
# Work on it...
# Publish when done
astrolock publish mixes/new-mix
4. Backup Regularly
If using git:
git add .
git commit -m "Added new content"
git push
5. Document Your Process
Keep a CONTENT_NOTES.md file:
# Content Guidelines
## DJ Mixes
- Always include tracklist
- Tag with genre + year
- Category: mixes
- Include mix duration in description
## Photos
- Use descriptive titles
- Tag with location + year
- Compress before uploading
Troubleshooting
”I can’t find my content"
# List everything
astrolock list <collection>
# Check if it's a draft
# Look for "draft: true" in the list
"Content not showing on site”
Check these:
- Is it published?
draft: false - Did you rebuild?
astrolock build - Is the media file uploaded?
- Check for errors in the build output
”I deleted something by accident”
If using git:
git checkout HEAD content/mixes/deleted-mix.md
Otherwise, you’ll need to recreate it.
”Categories aren’t showing”
Make sure categories are in a list:
# Good
categories:
- house
- techno
# Bad
categories: house, techno
Next Steps
- Learn more: Read the Collections Guide for advanced organization
- Practice: Create test content and experiment
- Build workflows: Develop your own process
- Stay organized: Review and clean up regularly
Remember: Content management gets easier with practice. Start small, build habits, and you’ll be a pro in no time!