Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down Expand Up @@ -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
Expand All @@ -131,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

Expand Down Expand Up @@ -254,7 +259,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
Expand All @@ -264,14 +269,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
---
Expand Down Expand Up @@ -331,7 +337,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
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
14 changes: 8 additions & 6 deletions create_post.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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 = @"
---
Expand All @@ -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"
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'"
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Rename-Item example is incorrect. It attempts to rename the full path to just the date and topic, but should rename to the full path with the new slug. The correct target should be 'docs/posts/$year/$month/$day/$date-your-topic-here' to match the bash script's mv example pattern.

Suggested change
Write-Output "Example: Rename-Item '$folderPath' '$date-your-topic-here'"
Write-Output "Example: Rename-Item '$folderPath' 'docs/posts/$year/$month/$day/$date-your-topic-here'"

Copilot uses AI. Check for mistakes.
10 changes: 7 additions & 3 deletions create_post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
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'"
Loading