Type something to search...

Astrolock content

astrolock content

astrolock content

Create new content items in your Astrolock site.

Synopsis

astrolock content <collection> <title> [--draft]

Description

The content command generates new content items with proper frontmatter templates. It works with:

  • Blog posts (blog)
  • Authors (author)
  • Media items (any collection in .astrolock/astrolock.yaml)

The command automatically:

  • Generates a URL-friendly slug from the title
  • Creates markdown with appropriate frontmatter
  • Sets current date/time
  • Uses your default author

Arguments

ArgumentDescription
<collection>Target collection: blog, author, or any media collection
<title>Title of the content item (will be slugified for filename)

Options

OptionDescription
--draft, -dCreate as draft (won’t be published)

Usage Examples

astrolock content blog "My First Post"

Creates: content/blog/my-first-post.md

Generated Templates

---
title: "My First Post"
description: ""
date: 2025-01-15T10:30:00Z
author: "Your Name"
image: "/images/site/image-placeholder.png"
categories: []
tags: []
draft: false
---

Your content here...

For media collections (audio, video, images):

---
title: "Summer Vibes 2025"
description: ""
date: 2025-01-15T10:30:00Z
author: "Your Name"
image: "/images/content/mixes/summer-vibes-2025.jpg"
audio: "/audio/content/mixes/summer-vibes-2025.mp3"
categories: []
tags: []
draft: false
---

Your content here...

Next Steps

After creating content:

  1. Edit the file to add your content
  2. Add media files to the appropriate public/ subdirectory
  3. Preview with astrolock write
  4. Build with astrolock build

Tip

Media filenames must match the markdown slug. For summer-vibes-2025.md, your audio file should be summer-vibes-2025.mp3.

See Also