Test your site before deploying
Preview shows exactly what your deployed site will look like.
Preview vs Write Mode
| Mode | Command | Purpose |
|---|---|---|
| Write | astrolock write | Fast refresh while editing |
| Preview | astrolock preview | Full production build |
Warning
Always preview before deploying. Write mode skips some optimizations.
Running Preview
astrolock preview
This:
- Builds your entire site (like production)
- Starts a local server
- Opens your browser to the preview
What to Check
Before deploying, verify:
- All pages load correctly
- Images and media display
- Links work (no 404s)
- Navigation is correct
- Mobile layout looks good
Tip
Use your browser’s developer tools (F12) to test mobile views.
Common Preview Issues
- Check that content files are in the correct folders - Verify frontmatter has
required fields - Check
.astrolock/astrolock.yamlto confirm collections are configured
- Confirm files are in
public/folder - Check paths in frontmatter match actual file locations - Paths are case-sensitive
- Read the error message carefully - Check frontmatter syntax (YAML formatting) - Ensure required fields are present
Next Steps
Once preview looks good:
- Deploy your site to go live
- See CLI Reference for all site commands