Initial commit: Astro 6 static blog site
All checks were successful
Deploy / deploy (push) Successful in 49s
All checks were successful
Deploy / deploy (push) Successful in 49s
- German (default) and English i18n support - Categories and tags - Blog posts with hero images - Dark/light theme switcher - View Transitions removed to fix reload ghost images - Webmentions integration - RSS feeds per locale Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
commit
5bb63bacf5
95 changed files with 12199 additions and 0 deletions
38
scripts/new-post-prompt.sh
Executable file
38
scripts/new-post-prompt.sh
Executable file
|
|
@ -0,0 +1,38 @@
|
|||
#!/usr/bin/env bash
|
||||
# Standalone wrapper für Obsidian Script Runner — neuen Blog-Post anlegen
|
||||
set -euo pipefail
|
||||
|
||||
VAULT='/Users/adrian/Obsidian/Web/adrian-altner-com'
|
||||
|
||||
TITLE=$(osascript \
|
||||
-e 'Tell application "System Events" to display dialog "Post title:" default answer ""' \
|
||||
-e 'text returned of result' 2>/dev/null) || exit 0
|
||||
|
||||
if [[ -z "$TITLE" ]]; then exit 0; fi
|
||||
|
||||
SLUG=$(echo "$TITLE" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9 -]//g' | sed 's/ \+/-/g' | sed 's/^-\+//;s/-\+$//')
|
||||
DATE_FOLDER=$(date +%Y/%m/%d)
|
||||
PUBLISH_DATE=$(date +%Y-%m-%dT%H:%M:%S%z)
|
||||
DIR="$VAULT/content/blog/posts/$DATE_FOLDER"
|
||||
FILE="$DIR/$SLUG.md"
|
||||
|
||||
mkdir -p "$DIR"
|
||||
|
||||
if [[ -f "$FILE" ]]; then
|
||||
osascript -e "display notification \"File already exists: $SLUG.md\" with title \"New Post\"" 2>/dev/null || true
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat > "$FILE" << EOF
|
||||
---
|
||||
title: "$TITLE"
|
||||
description: ""
|
||||
publishDate: $PUBLISH_DATE
|
||||
tags:
|
||||
-
|
||||
draft: true
|
||||
syndication:
|
||||
---
|
||||
EOF
|
||||
|
||||
echo "Created: $FILE"
|
||||
Loading…
Add table
Add a link
Reference in a new issue