mix sayfa.gen.content (Sayfa v0.5.0)

Copy Markdown View Source

Generates a new content file with front matter scaffolding.

Usage

mix sayfa.gen.content TYPE TITLE [options]
mix sayfa.gen.content --list

Examples

mix sayfa.gen.content article "My First Article"
mix sayfa.gen.content note "Quick Tip"
mix sayfa.gen.content project "My Project" --tags=elixir,oss --draft
mix sayfa.gen.content talk "Intro to Elixir" --date=2026-03-15
mix sayfa.gen.content article "Hello World" --lang=en,tr
mix sayfa.gen.content --list

Options

  • --list - List available content types
  • --date - Override date (default: today), format YYYY-MM-DD
  • --tags - Comma-separated tags
  • --categories - Comma-separated categories
  • --draft - Mark as draft
  • --lang - Language code or comma-separated codes (e.g., en or en,tr)
  • --slug - Custom slug (default: slugified from title)

When multiple languages are provided, one file is generated per language with translations front matter pre-wired to link them together.

Files are created under content/{type_directory}/ with appropriate front matter based on the content type's required fields.