astrolock import
Bring content into your Astrolock site from various sources.
Available Import Types
astrolock import rekordbox # Import DJ mixes from Rekordbox
astrolock import apple-photos # Import photos from Apple Photos albums
astrolock import stock-images # Import stock/fallback images
astrolock import images # Create image collection from folder
astrolock import media # Bulk import media files
Rekordbox Import
Perfect for DJs! Import recorded mixes with automatic tracklisting.
Requirements
- ✅ Rekordbox recording (WAV file)
- ✅ Cue file from Rekordbox (same name as WAV)
- ✅ lame encoder:
brew install lame ffmpeg
Quick Start
astrolock import rekordbox
The wizard will:
- Let you choose an audio collection
- Ask for configuration (import folder, metadata, etc.)
- Save settings to
.astrolock/astrolock.yaml(rekordbox section) - Process WAV, create markdown with tracklist
Settings in .astrolock/astrolock.yaml under plugins.rekordbox:
plugins:
rekordbox:
mixes:
enabled: true
IMPORT_FOLDER: ~/Rekordbox/Recordings
POST_TITLE_PREFIX: My Podcast
POST_TAGS: mix, techno, house
TAG_GENRE: Electronic
TAG_ARTIST: Your DJ Name
TAG_ALBUM: Mix SeriesUse defaults to share settings across collections:
plugins:
rekordbox:
defaults:
IMPORT_FOLDER: ~/Rekordbox/Recordings
TAG_ARTIST: DJ Name
mixes:
enabled: true
TAG_ALBUM: Techno SessionsTip
Save settings the first time - subsequent imports just press Enter!
Apple Photos Import
Import photos from your Apple Photos library (macOS only).
# Interactive setup
astrolock import apple-photos --interactive
# Import specific collection
astrolock import apple-photos gallery
The wizard will:
- List all your Apple Photos albums
- Guide you through configuration
- Save settings to
.astrolock/astrolock.yaml(apple-photos section) - Import photos with full metadata
Settings in .astrolock/astrolock.yaml under plugins.apple-photos:
plugins:
apple-photos:
gallery:
enabled: true
album_name: My Portfolio
source_folder: src/content/gallery
assets_folder: public/images/gallery
max_width: 1920
extract_keywords: trueFeatures:
- Full metadata import (titles, descriptions, keywords, locations)
- Automatic image optimization
- GPS location support
- Keyword tagging from Photos
Tip
Requires macOS and Apple Photos app with at least one album.
Stock Images Import
Import optimized stock/fallback images for collections.
# List available collections
astrolock import stock-images
# Import for specific collection
astrolock import stock-images blog
Configure in .astrolock/astrolock.yaml under plugins.stock-images:
plugins:
stock-images:
defaults:
source: local
local_path: ~/Pictures/stock-images
optimize: true
quality: 80
format: jpeg
blog:
enabled: true
output_folder: public/images/stock/blog
format: webpWhat it does:
- Scans source folder for images
- Optimizes and converts to desired format
- Copies to
public/images/stock/{collection}/ - Shows size savings
Images Collection Import
Create a new media collection from a folder of images.
astrolock import images gallery ~/Pictures/MyGallery
Creates:
src/content/gallery/
├── sunset-beach.md
├── mountain-view.md
└── city-lights.md
public/images/content/gallery/
├── sunset-beach.jpeg
├── mountain-view.jpeg
└── city-lights.jpegEach markdown file includes frontmatter with title, date, categories, and image path.
After import, configure the collection in .astrolock/astrolock.yaml under collections.
Media Import
Bulk import photos, audio, or videos into an existing collection.
astrolock import media <collection> <source-folder>
Examples
# Import photos
astrolock import media galleries ~/Pictures/Vacation
# Import with options
astrolock import media galleries ~/Pictures --draft --category travel
Options
| Option | Description |
|---|---|
--draft | Create as drafts |
--category <cat> | Set category |
--tag <tag> | Add tag (repeatable) |
Supported Files
- Images: JPG, PNG, GIF, WebP, SVG
- Audio: MP3, M4A, WAV, FLAC, AAC, OGG
- Video: MP4, MOV, AVI, WebM, MKV
Common Workflows
- DJ Workflow
- Photo Gallery
- Stock Images
# First import - configure once
astrolock import rekordbox
# Follow prompts, save settings
# Subsequent imports - just press Enter!
astrolock import rekordbox# Create collection from folder
astrolock import images travel ~/Pictures/Travel
# Configure in .astrolock/astrolock.yaml (collections section)
nano .astrolock/astrolock.yaml
# Build and preview
astrolock build && astrolock preview# Configure in .astrolock/astrolock.yaml
nano .astrolock/astrolock.yaml # Add plugins.stock-images settings
# Import for collections
astrolock import stock-images blog
astrolock import stock-images mixes# First import - configure once
astrolock import rekordbox
# Follow prompts, save settings
# Subsequent imports - just press Enter!
astrolock import rekordbox# Create collection from folder
astrolock import images travel ~/Pictures/Travel
# Configure in .astrolock/astrolock.yaml (collections section)
nano .astrolock/astrolock.yaml
# Build and preview
astrolock build && astrolock preview# Configure in .astrolock/astrolock.yaml
nano .astrolock/astrolock.yaml # Add plugins.stock-images settings
# Import for collections
astrolock import stock-images blog
astrolock import stock-images mixesTips
Tip
Rekordbox: Keep WAV and CUE files together in the same folder.
Tip
Images: Use descriptive filenames - they become the title.
Next Steps
After importing:
- Review: Check content in
content/<collection>/ - Edit: Add descriptions, tags, categories
- Build:
astrolock build - Preview:
astrolock preview
See Also
- Rekordbox Plugin Guide - Detailed DJ workflow
- astrolock content - Create individual items
- Your First Steps - Complete walkthrough