Theme Update Guide
Keep your Astro Swiss theme up-to-date with the latest features, improvements, and security fixes.
Before You Update
Section titled “Before You Update”1. Check Your Current Version
Section titled “1. Check Your Current Version”⏱️ Time: 1 minute
Find your current version in package.json:
{ "name": "astro-swiss-starter-theme", "version": "1.0.0" // ← Your current version}2. Review the Changelog
Section titled “2. Review the Changelog”⏱️ Time: 5-10 minutes
Always read the changelog before updating! It contains:
- ✨ New features
- 🐛 Bug fixes
- ⚠️ Breaking changes
- 📝 Migration instructions
Visit the Changelog or check your purchase email for update notifications.
3. Document Your Customizations
Section titled “3. Document Your Customizations”⏱️ Time: 5 minutes
Create a customization checklist. Copy this template to a file called my-customizations.md:
# My Customizations Checklist
## Modified Files- [ ] src/consts.ts - Company info and employees- [ ] src/i18n/ui.ts - Custom translations- [ ] src/data/portfolio/fr.ts - Portfolio projects (French)- [ ] src/data/portfolio/de.ts - Portfolio projects (German)- [ ] src/styles/tokens.css - Brand colors- [ ] .env - Environment variables
## Custom Files I Created- [ ] src/components/[ComponentName].astro- [ ] src/pages/[PageName].astro- [ ] Other: _______________
## Assets- [ ] src/assets/ - Custom images- [ ] public/ - Static files
## Notes- Customization details: _______________- Special configurations: _______________Choosing an Update Method
Section titled “Choosing an Update Method”Quick Decision Guide
Section titled “Quick Decision Guide”Answer these questions:
-
Have you created custom components or pages?
- Yes → Use Method 1: Safe Update
- No → Continue to question 2
-
Have you modified theme files beyond
consts.ts,ui.ts, andtokens.css?- Yes → Use Method 1: Safe Update
- No → Continue to question 3
-
Are you comfortable with Git and merge conflicts?
- Yes → Use Method 3: Git Merge (fastest)
- No → Use Method 2: Fresh Install (safest)
Method Comparison
Section titled “Method Comparison”| Method | Best For | Difficulty | Time | Risk |
|---|---|---|---|---|
| Safe Update | Heavy customizations, custom components | Medium | 30-60 min | Low |
| Fresh Install | Light customizations (mostly data changes) | Easy | 20-40 min | Very Low |
| Git Merge | Git users comfortable with conflicts | Advanced | 15-30 min | Medium |
Method 1: Safe Update
Section titled “Method 1: Safe Update”Best for: Sites with custom components, structural changes, or extensive modifications.
Total time: ⏱️ 30-60 minutes
This method manually merges new features while preserving your work.
-
Backup Your Work (5 minutes)
Terminal window # Commit all changesgit add .git commit -m "Pre-update backup - v1.0.0"# Create backup branchgit branch backup-v1.0.0# Tag current stategit tag pre-update-v1.0.0Terminal window # Windowsxcopy /E /I astro-swiss-starter-theme astro-swiss-backup-2025-12-29# Mac/Linuxcp -r astro-swiss-starter-theme astro-swiss-backup-2025-12-29 -
Download New Version (2 minutes)
- Download the latest theme
.zipfile from your purchase email or dashboard - Extract to a temporary location (e.g.,
astro-swiss-v1.1.0-temp)
- Download the latest theme
-
Compare Changes (10-15 minutes)
Use a diff tool to compare folders:
Platform Recommended Tools Windows WinMerge, Beyond Compare Mac FileMerge, Kaleidoscope Cross-platform VS Code, Meld Focus on these key areas:
Area What to Check package.jsonNew dependencies, version updates src/components/New or updated components src/styles/New design tokens, CSS updates astro.config.mjsConfiguration changes starwind.config.jsonStarwind UI updates -
Update Dependencies (3-5 minutes)
Copy the new
package.jsondependencies section and install:Terminal window npm install -
Merge New Features (10-20 minutes)
Manually copy new features you want:
- New components: Copy from
src/components/in the new version - Style updates: Merge changes from
src/styles/ - Configuration: Update
astro.config.mjsif needed
- New components: Copy from
-
Test Thoroughly (10-15 minutes)
Terminal window # Start dev servernpm run devVerify in browser (http://localhost:4321):
- ✅ All pages load correctly
- ✅ Language switching works (French ↔ German)
- ✅ Dark mode toggle works
- ✅ Your customizations are intact
- ✅ New features work as expected
- ✅ No console errors (press F12 to check)
Terminal window # Build for productionnpm run build# Preview production buildnpm run preview
Method 2: Fresh Install
Section titled “Method 2: Fresh Install”Best for: Sites with minimal customizations (mostly data in consts.ts, i18n/, and data/).
Total time: ⏱️ 20-40 minutes
This method starts fresh and re-applies your customizations.
-
Save Your Customizations (5 minutes)
Terminal window # Create backup foldermkdir my-customizations# Copy your data filescp src/consts.ts my-customizations/cp src/i18n/ui.ts my-customizations/cp -r src/data/portfolio my-customizations/cp src/styles/tokens.css my-customizations/cp -r src/assets my-customizations/cp .env my-customizations/Terminal window # Create backup folderNew-Item -ItemType Directory -Path my-customizations# Copy your data filesCopy-Item src/consts.ts my-customizations/Copy-Item src/i18n/ui.ts my-customizations/Copy-Item -Recurse src/data/portfolio my-customizations/Copy-Item src/styles/tokens.css my-customizations/Copy-Item -Recurse src/assets my-customizations/Copy-Item .env my-customizations/ -
Install New Version (5 minutes)
-
Backup your current project (if not using Git):
Terminal window # Mac/Linuxcp -r ../astro-swiss-starter-theme ../astro-swiss-backup# Windows (PowerShell)Copy-Item -Recurse ..\astro-swiss-starter-theme ..\astro-swiss-backup -
Extract the new theme version to your project location
-
Install dependencies:
Terminal window npm install
-
-
Re-apply Your Customizations (10-15 minutes)
Company & Employee Data:
- Open
my-customizations/consts.ts - Copy your
COMPANYandEMPLOYEESdata - Paste into the new
src/consts.ts
Translations:
- Open
my-customizations/ui.ts - Copy your custom translation keys
- Merge into the new
src/i18n/ui.ts
Portfolio Projects:
- Copy your projects from
my-customizations/portfolio/tosrc/data/portfolio/
Styling:
- Compare
my-customizations/tokens.csswith newsrc/styles/tokens.css - Re-apply your color customizations
- Keep new design tokens from the update
Assets:
- Copy your images from
my-customizations/assets/tosrc/assets/
Environment Variables:
- Copy settings from
my-customizations/.envto new.env
- Open
-
Test Everything (10 minutes)
Terminal window npm run devOpen http://localhost:4321 and verify:
- ✅ Company info displays correctly
- ✅ Team section shows your employees
- ✅ Portfolio shows your projects
- ✅ Colors match your brand
- ✅ All translations work (test both languages)
- ✅ Custom features still work
- ✅ No console errors (F12 → Console tab)
Then test production build:
Terminal window npm run buildnpm run preview
Method 3: Git Merge
Section titled “Method 3: Git Merge”Best for: Developers comfortable with Git and merge conflict resolution.
Total time: ⏱️ 15-30 minutes (depending on conflicts)
-
Add Theme Repository (2 minutes)
Terminal window # Add theme repo as remotegit remote add theme https://github.com/vincentheimann/astro-swiss-starter-theme.git# Fetch latest changesgit fetch theme -
Create Update Branch (1 minute)
Terminal window # Create update branchgit checkout -b update-to-v1.1.0# Merge new versiongit merge theme/main -
Resolve Conflicts (10-20 minutes)
Git will show conflicts in customized files:
Terminal window # View conflictsgit status# For each conflicting file:# 1. Open in your editor# 2. Look for conflict markers: <<<<<<<, =======, >>>>>>># 3. Keep your customizations + new features# 4. Remove conflict markers# 5. Save the file# Mark as resolvedgit add <file>Common conflict files:
File How to Resolve src/consts.tsKeep your data, merge new type definitions src/i18n/ui.tsKeep your translations, add new keys src/styles/tokens.cssKeep your colors, add new tokens package.jsonUse new version’s dependencies -
Complete the Merge (5 minutes)
Terminal window # After resolving all conflictsgit commit -m "Merge theme update v1.1.0"# Test the updatenpm installnpm run devTest thoroughly before merging to main!
-
Merge to Main (2 minutes)
Terminal window # If everything worksgit checkout maingit merge update-to-v1.1.0# Clean upgit branch -d update-to-v1.1.0
Post-Update Checklist
Section titled “Post-Update Checklist”Development Testing
Section titled “Development Testing”-
npm installcompletes without errors -
npm run devstarts successfully - No console errors in browser
- All pages load correctly
- Language switching works (French ↔ German)
- Dark mode toggle works
- Portfolio carousel and lightbox work
- Contact form displays correctly
- All customizations are intact
Production Testing
Section titled “Production Testing”-
npm run buildcompletes without errors -
npm run previewworks correctly - Test on multiple browsers (Chrome, Firefox, Safari)
- Test on mobile devices
- Check Lighthouse scores (should be 90+)
- Verify SEO meta tags
- Test GTM integration (if used)
Content Verification
Section titled “Content Verification”- Company information is correct
- Team members display properly
- Portfolio projects show correctly
- All translations are accurate
- Images load properly
- Links work correctly
- Social media links are correct
Troubleshooting
Section titled “Troubleshooting”Build Errors
Section titled “Build Errors”Error: Cannot find module 'astro' or similar dependency errors
# Solution: Clean installrm -rf node_modules package-lock.jsonnpm installError: [ERROR] The plugin "astro:jsx" was referenced in "..." but not found
# Solution: Clear Astro cache and rebuildrm -rf .astronpm run buildError: Unexpected token... or syntax errors
# Solution: Check Node.js versionnode --version # Should be 18.17.0+
# Update Node.js if needed, then reinstallnpm installStyling Issues
Section titled “Styling Issues”Problem: Colors or styles look wrong
- Check for conflicting CSS in
src/styles/tokens.css - Clear browser cache (Ctrl+Shift+Delete)
- Compare your
tokens.csswith new version - Ensure you’re not overriding new CSS variables
Component Errors
Section titled “Component Errors”Problem: Component not rendering or throwing errors
- Check changelog for component API changes
- Verify you’re using correct props
- Check browser console for specific errors
- Compare usage with new documentation
Emergency Rollback
Section titled “Emergency Rollback”If You Used Git
Section titled “If You Used Git”# List your backup branchesgit branch | grep backup
# Switch to backup branchgit checkout backup-v1.0.0
# Or switch to tagged versiongit checkout pre-update-v1.0.0# View recent commitsgit log --oneline -10
# Reset to specific commit (replace COMMIT_HASH)git reset --hard COMMIT_HASH
# Force push if already pushed (use with caution)git push --forceIf You Used Manual Backup
Section titled “If You Used Manual Backup”Restore from backup folder:
# Mac/Linuxrm -rf astro-swiss-starter-themecp -r astro-swiss-backup-2025-12-29 astro-swiss-starter-themecd astro-swiss-starter-themenpm install
# Windows (PowerShell)Remove-Item -Recurse -Force astro-swiss-starter-themeCopy-Item -Recurse astro-swiss-backup-2025-12-29 astro-swiss-starter-themecd astro-swiss-starter-themenpm installVerify Rollback Worked
Section titled “Verify Rollback Worked”# Check versioncat package.json | grep version
# Test the sitenpm run devYou should see your previous working version running.
Update Success! 🎉
Section titled “Update Success! 🎉”Once you’ve completed the update and all tests pass:
Confirm Everything Works
Section titled “Confirm Everything Works”- ✅ Development server runs without errors
- ✅ Production build completes successfully
- ✅ All pages load correctly
- ✅ Features work as expected
- ✅ Your customizations are intact
Clean Up
Section titled “Clean Up”# Remove backup files (optional)rm -rf my-customizations/rm -rf astro-swiss-backup-*/
# Remove old backup branches (Git users)git branch -d backup-v1.0.0git tag -d pre-update-v1.0.0Document the Update
Section titled “Document the Update”Add a note to your project documentation:
## Update History- 2025-12-29: Updated from v1.0.0 to v1.1.0 - New features: [list key features] - Breaking changes: [list any] - Notes: [any important observations]Stay up-to-date and enjoy the latest features! 🚀