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 |
| 7 | if [ -f .env.local ]; then |
| 8 | export $(grep -v '^#' .env.local | xargs) |
| 9 | echo "Loaded environment variables from .env.local" |
| 10 | else |
| 11 | echo "Warning: .env.local file not found. Make sure environment variables are set." |
| 12 | fi |
| 13 | |
| 14 | # Execute the TypeScript script |
| 15 | echo "Running blog markdown processor..." |
| 16 | npx tsx scripts/process-blog-markdown.ts |
| 17 | |
| 18 | # Check the exit status |
| 19 | if [ $? -eq 0 ]; then |
| 20 | echo "✅ Blog markdown processing completed successfully." |
| 21 | else |
| 22 | echo "❌ Blog markdown processing failed." |
| 23 | exit 1 |
| 24 | fi |