Reorganize blog by year

This commit is contained in:
Neale Pickett 2023-09-25 17:23:49 -06:00
parent 1ceaba75c6
commit 95af63afb0
66 changed files with 8 additions and 6 deletions

View File

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View File

Before

Width:  |  Height:  |  Size: 434 KiB

After

Width:  |  Height:  |  Size: 434 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 93 KiB

View File

@ -16,17 +16,19 @@ esac
SLUG="$1"
TITLE="${2:-$SLUG}"
DATE="$(date +%Y-%m-%d)"
YYYY="$(date +%Y)"
MM="$(date +%m)"
DD="$(date +%d)"
slug=$(echo "$SLUG" | tr 'A-Z ' 'a-z-')
dir="$DATE-$slug"
index=$dir/index.md
dir="$YYYY/$MM-$DD-$slug"
index="$dir/index.md"
mkdir $dir
cat <<EOD >$index
mkdir -p "$dir"
cat <<EOD >"$index"
---
title: $TITLE
date: $DATE
date: $YYYY-$MM-$DD
tags:
- untagged
---