blogs/scripts/build-for-subdomains.js
Neeldhara Misra b47b761f1c feat: Complete multi-blog setup with 12 collections and subdomain routing
- Added 12 blog collections: art, bfs, dfs, problems, puzzles, reviews, reflections, vibes, workflows, magic, contests, poetry
- Created content config with glob loaders for all collections
- Added sample posts for each collection
- Fixed TypeScript collection recognition by removing duplicate config
- Made BlogPosts component collection-aware for proper routing
- Created individual post pages ([...slug].astro) for each collection
- Added Netlify subdomain routing configuration
- Updated all references to use neeldhara.blog as main domain
- Fixed navigation links in all-blogs component

Ready for GitHub/Netlify deployment with subdomain support.
2025-08-10 01:22:06 +05:30

29 lines
852 B
JavaScript

#!/usr/bin/env node
/**
* Build script for subdomain deployment
* This ensures all collections are properly built and accessible via subdomain routing
*/
import { execSync } from 'child_process';
import { writeFileSync } from 'fs';
console.log('🏗️ Building multi-blog site for subdomain deployment...');
// Build the Astro site
try {
console.log('📦 Building Astro site...');
execSync('npm run build', { stdio: 'inherit' });
console.log('✅ Build completed successfully!');
console.log('🌐 Ready for subdomain deployment to Netlify');
console.log('');
console.log('Next steps:');
console.log('1. Deploy to Netlify');
console.log('2. Configure custom domains for subdomains');
console.log('3. Test subdomain routing');
} catch (error) {
console.error('❌ Build failed:', error.message);
process.exit(1);
}