diff --git a/scripts/new-note-mdx-prompt.sh b/scripts/new-note-mdx-prompt.sh index 82ee6aa..79d96b3 100755 --- a/scripts/new-note-mdx-prompt.sh +++ b/scripts/new-note-mdx-prompt.sh @@ -30,7 +30,8 @@ publishDate: $PUBLISH_DATE description: "" cover: "./$SLUG.jpg" coverAlt: "" -tags: [] +tags: + - draft: false syndication: --- diff --git a/scripts/new-note-prompt.sh b/scripts/new-note-prompt.sh index 6f65d7b..abb1d5f 100755 --- a/scripts/new-note-prompt.sh +++ b/scripts/new-note-prompt.sh @@ -28,7 +28,8 @@ cat > "$FILE" << EOF title: "$TITLE" publishDate: $PUBLISH_DATE description: "" -tags: [] +tags: + - draft: false syndication: --- diff --git a/scripts/new-note.sh b/scripts/new-note.sh index c892390..cb9d271 100755 --- a/scripts/new-note.sh +++ b/scripts/new-note.sh @@ -45,7 +45,8 @@ publishDate: $PUBLISH_DATE description: "" cover: "./$SLUG.jpg" coverAlt: "" -tags: [] +tags: + - draft: false syndication: --- @@ -56,7 +57,8 @@ else title: "$TITLE" publishDate: $PUBLISH_DATE description: "" -tags: [] +tags: + - draft: false syndication: --- diff --git a/scripts/new-post-prompt.sh b/scripts/new-post-prompt.sh index 76411d6..69ad081 100755 --- a/scripts/new-post-prompt.sh +++ b/scripts/new-post-prompt.sh @@ -28,8 +28,8 @@ cat > "$FILE" << EOF title: "$TITLE" description: "" publishDate: $PUBLISH_DATE -tags: [] -category: general +tags: + - draft: true syndication: --- diff --git a/scripts/new-post.sh b/scripts/new-post.sh index 910638c..21e393d 100755 --- a/scripts/new-post.sh +++ b/scripts/new-post.sh @@ -29,8 +29,8 @@ cat > "$FILE" << EOF title: "$TITLE" description: "" publishDate: $PUBLISH_DATE -tags: [] -category: general +tags: + - draft: true syndication: --- diff --git a/scripts/publish-all.sh b/scripts/publish-all.sh index c4ef86e..16bb168 100755 --- a/scripts/publish-all.sh +++ b/scripts/publish-all.sh @@ -1,14 +1,12 @@ #!/usr/bin/env bash set -euo pipefail -VAULT_BLOG='/Users/adrian/Obsidian/Web/adrian-altner-com/content/blog' -VAULT_PHOTOS='/Users/adrian/Obsidian/Web/adrian-altner-com/content/photos' +VAULT_CONTENT='/Users/adrian/Obsidian/Web/adrian-altner-com/content' VPS="${1:-hetzner}" REMOTE_BRANCH="${2:-main}" -REMOTE_BASE='/opt/websites/www.adrian-altner.com' -REMOTE_BLOG="${REMOTE_BASE}/src/content/blog" -REMOTE_PHOTOS="${REMOTE_BASE}/src/content/photos" +REMOTE_BASE='/opt/websites/adrian-altner.com' +REMOTE_CONTENT="${REMOTE_BASE}/src/content" # --- 1. Sync vault to VPS --- ssh "$VPS" " @@ -18,17 +16,9 @@ ssh "$VPS" " git checkout '$REMOTE_BRANCH' git reset --hard 'origin/$REMOTE_BRANCH' git clean -fd -e .env -e .env.production - mkdir -p '$REMOTE_BLOG' - mkdir -p '$REMOTE_PHOTOS' + mkdir -p '$REMOTE_CONTENT' " -rsync -az --delete \ - --include='*/' \ - --include='*.md' \ - --include='*.mdx' \ - --exclude='*' \ - "$VAULT_BLOG/" "$VPS:$REMOTE_BLOG/" - rsync -az --delete \ --include='*/' \ --include='*.md' \ @@ -40,15 +30,18 @@ rsync -az --delete \ --include='*.json' \ --exclude='.DS_Store' \ --exclude='*' \ - "$VAULT_PHOTOS/" "$VPS:$REMOTE_PHOTOS/" + "$VAULT_CONTENT/" "$VPS:$REMOTE_CONTENT/" # --- 2. Build + cleanup --- ssh "$VPS" " set -euo pipefail cd '$REMOTE_BASE' - podman-compose -f compose.yml up --build -d --force-recreate - podman image prune -af - podman builder prune -af + sudo podman build -t localhost/adrian-altner.com:latest . + sudo systemctl restart podman-compose@adrian-altner.com.service + sudo podman container prune -f 2>/dev/null || true + sudo podman image prune --external -f 2>/dev/null || true + sudo podman image prune -f 2>/dev/null || true + sudo podman builder prune -af 2>/dev/null || true " echo "Redeploy done via $VPS (branch: $REMOTE_BRANCH)." @@ -64,4 +57,4 @@ if [[ -n "$WEBMENTION_APP_TOKEN" ]]; then echo "Webmentions triggered." else echo "No WEBMENTION_APP_TOKEN in .env.production — skipping webmentions." -fi +fi \ No newline at end of file diff --git a/scripts/publish-blog.sh b/scripts/publish-blog.sh index d539682..8722b90 100755 --- a/scripts/publish-blog.sh +++ b/scripts/publish-blog.sh @@ -45,7 +45,7 @@ ssh "$VPS" " podman-compose -f compose.yml up --build -d --force-recreate podman image prune -af - podman builder prune -af + podman builder prune -af || true " echo "Blog deploy done via $VPS (branch: $REMOTE_BRANCH)." diff --git a/src/components/Footer.astro b/src/components/Footer.astro index f31360c..4a84e6f 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -43,55 +43,27 @@ const { dark } = Astro.props; y2="6.5"> - + + - - - - - - +