Build Process
The portfolio uses Astro’s static site generation to create optimized HTML, CSS, and JavaScript files.Build Command
- Content Processing: Compiles MDX files and content collections
- Component Rendering: Processes React components and Astro components
- Asset Optimization: Optimizes images using Sharp, bundles CSS/JS
- Static Generation: Generates static HTML pages for all routes
Build Configuration
Key configuration fromastro.config.ts:
Make sure to update the
site URL in astro.config.ts and package.json to match your production domain.Build Output
The build creates adist/ directory containing:
- HTML files: Pre-rendered pages for all routes
- Assets: Optimized CSS, JavaScript, and images in
_astro/ - Static files: Public assets (favicon, images, etc.)
Output Structure
The output directory is fully static and can be served from any static hosting provider.
Deployment Options
This template supports multiple deployment platforms:Vercel (Recommended)
Primary platform with optimal configuration. Includes automatic deployments, preview URLs, and analytics integration.- Zero-config deployment
- Automatic HTTPS
- Built-in analytics and speed insights
- Git integration
Netlify
Popular alternative with excellent performance and features.- Continuous deployment
- Form handling
- Serverless functions support
- Custom domains
Static Hosting
Generic static hosting platforms like GitHub Pages, CloudFlare Pages, or any CDN.- Simple deployment
- Custom configurations
- Works with any static host
Pre-deployment Checklist
Before deploying, ensure you’ve completed these steps:Update Site Configuration
Update the
site URL in astro.config.ts and package.json to your production domain.Environment Variables
If you add features that require environment variables:- Create
.envfile locally (already in.gitignore) - Add variables to your hosting platform’s environment settings
- Use Astro’s
import.meta.envto access them
Performance Optimization
The template includes several performance optimizations:- Image Optimization: Sharp integration for responsive images
- Asset Bundling: CSS and JavaScript minification
- Content Collections: Efficient content loading
- Tailwind CSS: Purged and optimized styles
Next Steps
Choose a deployment platform and follow the specific guide:Deploy to Vercel
Recommended platform with zero-config setup
Deploy to Netlify
Alternative platform with great features
Static Hosting
Deploy to any static host or CDN