Branchwell

AI Resource Pro / website / scripts / process-blog-markdown.sh

1#!/bin/bash
2
3# Process blog markdown content script
4# This script processes all existing blog posts to convert markdown content to HTML
5
6# Load environment variables
7if [ -f .env.local ]; then
8 export $(grep -v '^#' .env.local | xargs)
9 echo "Loaded environment variables from .env.local"
10else
11 echo "Warning: .env.local file not found. Make sure environment variables are set."
12fi
13
14# Execute the TypeScript script
15echo "Running blog markdown processor..."
16npx tsx scripts/process-blog-markdown.ts
17
18# Check the exit status
19if [ $? -eq 0 ]; then
20 echo "✅ Blog markdown processing completed successfully."
21else
22 echo "❌ Blog markdown processing failed."
23 exit 1
24fi