メインコンテンツまでスキップ

/l-new-empty-article

New Empty Article

Create a new empty markdown file in the Articles category with proper naming convention.

Instructions

1. Parse Arguments

Parse $ARGUMENTS to extract title and slug:

  • If no arguments: ask user for both using AskUserQuestion
  • If one argument: treat as title, ask for slug
  • If two arguments: first is title, second is slug

2. Get Current Timestamp

Get current date/time for filename:

date +"%Y%m%d-%H%M"

3. Create File

Create file at doc/docs/articles/[YYYYMMDD-HHMM]-[slug].md with content:

---
title: [title]
---

# [title]

4. Report Result

Show the created file path to the user.

Arguments

$ARGUMENTS - Optional: "[title]" "[slug]" or just "[title]"