Type something to search...

Previewing Your Site

Test your site before deploying

Preview shows exactly what your deployed site will look like.

Preview vs Write Mode

ModeCommandPurpose
Writeastrolock writeFast refresh while editing
Previewastrolock previewFull production build

Warning

Always preview before deploying. Write mode skips some optimizations.

Running Preview

astrolock preview

This:

  1. Builds your entire site (like production)
  2. Starts a local server
  3. 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.yaml to 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: