Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
c1cc945
Add categories and tags placeholders to blog post templates
mrbiggred Feb 24, 2026
602c2f0
Refactor reminder messages in create_post.sh to be consistent with th…
mrbiggred Feb 24, 2026
5a5618e
Refactor date calculation in create_post.sh for compatibility with ma…
mrbiggred Feb 24, 2026
e768f37
Add comment to category and tag section reminding people to use exist…
mrbiggred Feb 25, 2026
7700ed3
Fix indentation in YAML frontmatter comments and correct typo in READ…
mrbiggred Feb 25, 2026
6073e57
Add a script to harvest tags and categories. Initially by Grok, then…
normanlorrain Feb 25, 2026
57a0a98
restored the mistakenly auto-formatted lines
normanlorrain Feb 25, 2026
9e8a387
Refactor find_tags_categories.py to use string parsing instead of YAM…
mrbiggred Mar 9, 2026
17ee852
Printer out tags in alphabetical order
mrbiggred Mar 9, 2026
2ad9497
Moved the find tags script from docs/ to the new scripts/ folder.
mrbiggred Mar 9, 2026
a0e47b4
Fixed path to find tags script in create post scripts.
mrbiggred Mar 9, 2026
49848f9
Updated documentation about the find tags script.
mrbiggred Mar 9, 2026
82a366a
Removed unneeded check.
mrbiggred Mar 9, 2026
fe91f73
Moved discard tags to outside the loop.
mrbiggred Mar 9, 2026
ed97a82
Updated README tag/category examples to match the scripts
mrbiggred Mar 9, 2026
f0d1cae
Python should be launched with "py" or "python",
normanlorrain Mar 9, 2026
c5317c8
Re-added the YAML library to the find tags script.
mrbiggred Mar 17, 2026
ccf9aaa
Guard Python calls in create_post scripts to handle missing Python gr…
mrbiggred Mar 19, 2026
3ad2aac
Fix incorrect return type annotation in extract_frontmatter()
mrbiggred Mar 19, 2026
6884682
Normalize tags/categories to handle scalars and None in find_tags_cat…
mrbiggred Mar 19, 2026
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
8 changes: 7 additions & 1 deletion create_post.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ title: "$title"
date: $date
authors:
- chris | norm | omar
categories:
- CATEGORY_HERE (use existing categories when possible)
tags:
- TAG_HERE (use existing tags when possible)
Comment thread
mrbiggred marked this conversation as resolved.
Outdated
Comment thread
mrbiggred marked this conversation as resolved.
Outdated
---

TOPIC_INTRODUCTION_HERE
Expand All @@ -55,4 +59,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 ""
Write-Output "Reminder: Use existing categories and tags when possible."
Comment thread
mrbiggred marked this conversation as resolved.
Outdated
26 changes: 18 additions & 8 deletions create_post.sh
Comment thread
mrbiggred marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
#!/bin/bash

# Calculate the next Tuesday (or today if it's Tuesday)
# In Linux date, weekday: 0=Sunday, 1=Monday, ..., 6=Saturday
current_weekday=$(date +%w) # 0=Sun ... 6=Sat
days_to_tuesday=$(( (2 - current_weekday + 7) % 7 ))

# If today is Tuesday, days_to_tuesday will be 0 → perfect
# Add the calculated days
tuesday=$(date -d "+${days_to_tuesday} days" +%Y-%m-%d)
# Add the calculated days (compatible with both macOS and Linux)
if date -v +0d &>/dev/null; then
# macOS (BSD date)
tuesday=$(date -v "+${days_to_tuesday}d" +%Y-%m-%d)
else
# Linux (GNU date)
tuesday=$(date -d "+${days_to_tuesday} days" +%Y-%m-%d)
fi

year=$(date -d "$tuesday" +%Y)
month=$(date -d "$tuesday" +%02m)
day=$(date -d "$tuesday" +%02d)
year=${tuesday%%-*} # 2026
month=${tuesday#*-}; month=${month%-*} # 02
day=${tuesday##*-} # 24

# Define paths
folder_path="docs/posts/$year/$month/$day"
Expand All @@ -27,6 +31,10 @@ title: "Your Blog Post Title"
date: $tuesday
authors:
- chris | norm | omar
categories:
- CATEGORY_HERE
tags:
- TAG_HERE
---

TOPIC_INTRODUCTION_HERE
Expand All @@ -36,4 +44,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 ""
echo "Reminder: Use existing categories and tags when possible."
Loading