Modern, SEO-optimized landing page for Desktop Commander built with Astro and React.
# Install dependencies
npm install
# Run development server
npm run dev
# Build for production
npm run buildVisit http://localhost:4321 to see the site.
npm run buildThis builds with base: '/' and:
- Outputs to
docs/folder - Generates sitemap.xml
- Adds CNAME file for custom domain
- Creates 404.html fallback
- All assets use root paths:
/assets/...
npm run build:githubThis builds with base: '/main-web-astro' and:
- Outputs to
docs/folder - All assets use subdirectory paths:
/main-web-astro/assets/... - Note: Remove the CNAME file after this build if deploying to subdirectory
Production (Custom Domain):
npm run build
git add docs/
git commit -m "Deploy to production"
git pushGitHub Pages Testing:
npm run build:github
rm docs/CNAME # Remove CNAME to use subdirectory
git add docs/
git commit -m "Deploy to GitHub Pages subdirectory"
git pushThe site is configured to deploy to GitHub Pages from the docs/ folder:
# Build and commit the docs folder
npm run commit-static
# Push to GitHub
git push- Go to repository Settings → Pages
- Set Source: Deploy from
docs/folder onmainbranch - Set Custom Domain:
desktopcommander.app - GitHub will automatically serve from
docs/
The docs/ folder is committed to git (not gitignored) for GitHub Pages deployment.
main-web-astro/
├── astro-src/ # Astro pages and layouts
│ ├── layouts/ # Page layouts
│ └── pages/ # Route pages (.astro files)
├── src/ # React components and utilities
│ ├── components/ # React components
│ ├── data/ # Data files (prompts, etc)
│ ├── hooks/ # React hooks
│ └── lib/ # Utilities
├── public/ # Static assets
├── docs/ # Build output (committed for GitHub Pages)
├── package.json # Dependencies and scripts
└── astro.config.mjs # Astro configuration
npm run dev # Start dev server (localhost:4321)
npm run dev:host # Start dev server (network accessible)
npm run build # Build for production → docs/
npm run build:dev # Build for development
npm run preview # Preview production build
npm run lint # Run ESLint
npm run serve # Serve built site from docs/
npm run serve:static # Serve built site (alias)
npm run serve:docs # Serve built site (alias)
npm run commit-static # Build + commit docs/ folder
npm run generate:sitemap # Generate sitemap only- Framework: Astro 5.x
- UI Library: React 18
- Styling: Tailwind CSS + shadcn/ui
- Icons: Lucide React
- Analytics: PostHog
- Build: Vite
- ✅ Static site generation (SSG) for optimal SEO
- ✅ React component hydration for interactivity
- ✅ Tailwind CSS for styling
- ✅ shadcn/ui components
- ✅ Dynamic prompt library with individual pages
- ✅ Automatic sitemap generation
- ✅ GitHub Pages ready
- ✅ Custom domain support
- ✅ Hot reload in development
- Output directory:
./docs(for GitHub Pages) - Base URL:
/(for custom domain) - Format:
directory(clean URLs)
- The
docs/folder contains the built static site - This folder IS committed to git for GitHub Pages
- GitHub Pages serves directly from
docs/on themainbranch
- The
docs/folder IS committed (not gitignored) for GitHub Pages - Always run
npm run buildbefore committing changes - Use
npm run commit-staticto build and commit in one step - CNAME file is auto-generated with custom domain
- 404.html is auto-generated for client-side routing fallback
# Kill process on port 4321
lsof -ti:4321 | xargs kill -9# Clean and reinstall
rm -rf node_modules package-lock.json
npm install# Ensure build completes
npm run build
# Check for errors in outputISC