Type something to search...

Content Collections

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.

TypeBest ForExamples
TextWritten contentBlog posts, articles, news
AudioSound filesPodcasts, music, DJ mixes
ImagesVisual galleriesPhotography, portfolios
VideoVideo contentTutorials, 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:

  1. Content folder - content/{collection-name}/
  2. Configuration - Defined in .astrolock/astrolock.yaml
  3. 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

FeatureDescriptionEnable
ArchiveBrowse by year/monthfeatures.archive: true (reference)
Index StyleControl index page layoutfeatures.indexStyle (reference)
CategoriesGroup related contentAdd to frontmatter (reference)
TagsKeyword labelsAdd to frontmatter (reference)
GenresMusic-style groupingAdd to frontmatter (reference)

Next Steps