From da338f5afbb80f3327507204202c999f232b6ebb Mon Sep 17 00:00:00 2001 From: Chris C Date: Tue, 13 Jan 2026 09:12:08 -0700 Subject: [PATCH 1/2] Update blog post directory structure to include descriptive titles in AGENTS.md. --- AGENTS.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 0f3fdf83..8f39ce43 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -47,7 +47,8 @@ This is the **Weekly Dev Chat** website, a static site built with MkDocs Materia │ └── YYYY/ │ └── MM/ │ └── DD/ - │ └── index.md # Blog post content + │ └── YYYY-MM-DD-title-of-post/ + │ └── index.md # Blog post content ├── assets/ # Images, logos, fonts, design files │ └── logo/ # Site branding assets └── stylesheets/ @@ -104,7 +105,9 @@ Each author has a name, description, and avatar URL. ## Blog Post Conventions ### File Structure -Blog posts are organized by date: `docs/posts/YYYY/MM/DD/index.md` +Blog posts are organized by date with descriptive titles: `docs/posts/YYYY/MM/DD/YYYY-MM-DD-title-of-post/index.md` + +This naming convention allows for multiple posts on the same day by using different descriptive titles. ### Post Frontmatter ```yaml @@ -254,7 +257,7 @@ The following are ignored: - `docs/join.md` - Join instructions - `docs/hosts/index.md` - Current hosts information - `docs/sponsors/index.md` - Sponsor information -- `docs/posts/YYYY/MM/DD/index.md` - Blog posts +- `docs/posts/YYYY/MM/DD/YYYY-MM-DD-title/index.md` - Blog posts ### For Configuration Changes - `mkdocs.yml` - Site configuration, theme, plugins, navigation @@ -264,14 +267,15 @@ The following are ignored: ### For Assets - `docs/assets/logo/` - Logo files (PNG, SVG) - `docs/assets/logo/Favicons/` - Favicon files -- `docs/posts/YYYY/MM/DD/` - Post-specific images +- `docs/posts/YYYY/MM/DD/YYYY-MM-DD-title/` - Post-specific images ## Common Agent Tasks ### Creating a New Blog Post 1. **Determine the date**: Calculate next Tuesday or use provided date -2. **Create directory**: `docs/posts/YYYY/MM/DD/` +2. **Create directory**: `docs/posts/YYYY/MM/DD/YYYY-MM-DD-descriptive-title/` + - Example: `docs/posts/2026/01/13/2026-01-13-ai-coding-assistants/` 3. **Create index.md** with proper frontmatter: ```yaml --- @@ -331,7 +335,7 @@ The following are ignored: 1. **Never modify** `.github/workflows/ci.yml` unless explicitly requested - deployment is automated and stable 2. **Always test locally** before pushing changes to main branch -3. **Blog posts must follow** the date-based directory structure: `YYYY/MM/DD/` +3. **Blog posts must follow** the date-based directory structure with descriptive title: `YYYY/MM/DD/YYYY-MM-DD-title-of-post/` 4. **Frontmatter is required** for all blog posts (title, date, authors) 5. **Images for blog posts** should be placed in the same directory as the post's `index.md` 6. **The site uses** Material for MkDocs theme - refer to https://squidfunk.github.io/mkdocs-material/ for advanced features From 29281577ce6724cb79370baa481ae18315452f34 Mon Sep 17 00:00:00 2001 From: Chris C Date: Tue, 13 Jan 2026 09:16:23 -0700 Subject: [PATCH 2/2] Update post creation scripts to include descriptive title in directory structure --- AGENTS.md | 6 ++++-- README.md | 10 +++++++--- create_post.ps1 | 14 ++++++++------ create_post.sh | 10 +++++++--- 4 files changed, 26 insertions(+), 14 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 8f39ce43..b9c60cfd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -134,16 +134,18 @@ Two helper scripts are available for creating new blog posts: 1. **Bash Script** (`create_post.sh`): - Calculates next Tuesday from current date - - Creates directory structure: `docs/posts/YYYY/MM/DD/` + - Creates directory structure: `docs/posts/YYYY/MM/DD/YYYY-MM-DD-title-of-post/` - Generates `index.md` with proper frontmatter template - Usage: `./create_post.sh` + - **Note**: Rename the created folder with a descriptive title after running 2. **PowerShell Script** (`create_post.ps1`): - Same functionality as bash script - For Windows users - Usage: `.\create_post.ps1` + - **Note**: Rename the created folder with a descriptive title after running -Both scripts automatically determine the date of the next Tuesday (or current day if Tuesday) and create the appropriate directory structure. +Both scripts automatically determine the date of the next Tuesday (or current day if Tuesday) and create the appropriate directory structure with a placeholder title. After running, rename the folder to include a descriptive title (e.g., `2026-01-13-ai-coding-assistants`). ## Development Workflows diff --git a/README.md b/README.md index 9e74f04b..77ec782f 100644 --- a/README.md +++ b/README.md @@ -74,12 +74,16 @@ We provide scripts to automatically create properly formatted blog posts for the These scripts will: - Calculate the date of the next Tuesday (or use today if it's Tuesday) -- Create the directory structure: `docs/posts/YYYY/MM/DD/` +- Create the directory structure: `docs/posts/YYYY/MM/DD/YYYY-MM-DD-title-of-post/` - Generate an `index.md` file with proper frontmatter +**Note**: After running the script, rename the created folder to include a descriptive title (e.g., `2026-01-13-ai-coding-assistants`). This allows multiple posts on the same day. + ### Manual Blog Post Creation -1. Create a directory following the date pattern: `docs/posts/YYYY/MM/DD/` +1. Create a directory following the date pattern: `docs/posts/YYYY/MM/DD/YYYY-MM-DD-title-of-post/` + - Example: `docs/posts/2026/01/13/2026-01-13-ai-coding-assistants/` + - The descriptive title allows for multiple posts on the same day 2. Create an `index.md` file with the following frontmatter: ```yaml @@ -122,7 +126,7 @@ These scripts will: ├── hosts/ # Current hosts ├── past-hosts/ # Past hosts ├── sponsors/ # Sponsors - ├── posts/ # Blog posts (YYYY/MM/DD/) + ├── posts/ # Blog posts (YYYY/MM/DD/YYYY-MM-DD-title/) ├── assets/ # Images, logos └── stylesheets/ └── extra.css # Custom CSS diff --git a/create_post.ps1 b/create_post.ps1 index 32455617..f5fa9c34 100644 --- a/create_post.ps1 +++ b/create_post.ps1 @@ -19,11 +19,12 @@ $tuesdayDate = $currentDate.AddDays($daysToTuesday) $year = $tuesdayDate.Year $month = $tuesdayDate.Month.ToString("D2") $day = $tuesdayDate.Day.ToString("D2") +$date = $tuesdayDate.ToString("yyyy-MM-dd") - - -# Define the folder path -$folderPath = "docs/posts/$year/$month/$day" +# Define the folder path with descriptive title placeholder +# Format: YYYY-MM-DD-title-of-post (allows multiple posts per day) +$postSlug = "$date-title-of-post" +$folderPath = "docs/posts/$year/$month/$day/$postSlug" # Create the folder if it doesn't exist if (-Not (Test-Path -Path $folderPath)) { @@ -35,7 +36,6 @@ $filePath = "$folderPath/index.md" # Create the markdown file with YAML front matter $title = "Your Blog Post Title" -$date = $tuesdayDate.ToString("yyyy-MM-dd") $yamlContent = @" --- @@ -55,4 +55,6 @@ Everyone and anyone are welcome to [join](https://weeklydevchat.com/join/) as lo # Write the content to the file Set-Content -Path $filePath -Value $yamlContent -Write-Output "Blog post template created at $filePath" \ No newline at end of file +Write-Output "Blog post template created at $filePath" +Write-Output "Remember to rename the folder with a descriptive title!" +Write-Output "Example: Rename-Item '$folderPath' '$date-your-topic-here'" \ No newline at end of file diff --git a/create_post.sh b/create_post.sh index 596ee4ac..6278272a 100644 --- a/create_post.sh +++ b/create_post.sh @@ -13,8 +13,10 @@ year=$(date -d "$tuesday" +%Y) month=$(date -d "$tuesday" +%02m) day=$(date -d "$tuesday" +%02d) -# Define paths -folder_path="docs/posts/$year/$month/$day" +# Define paths with descriptive title placeholder +# Format: YYYY-MM-DD-title-of-post (allows multiple posts per day) +post_slug="${tuesday}-title-of-post" +folder_path="docs/posts/$year/$month/$day/$post_slug" file_path="$folder_path/index.md" # Create the directory (including parents) if it doesn't exist @@ -36,4 +38,6 @@ Everyone and anyone are welcome to [join](https://weeklydevchat.com/join/) as lo ![alt text](${tuesday}_image_filename.webp) EOF -echo "Blog post template created at $file_path" \ No newline at end of file +echo "Blog post template created at $file_path" +echo "Remember to rename the folder with a descriptive title!" +echo "Example: mv '$folder_path' 'docs/posts/$year/$month/$day/${tuesday}-your-topic-here'" \ No newline at end of file