Content workflow

Use bun run content:refresh to rebuild the homepage and run smoke tests in one pass. Add CONTENT_WRANGLER_DEV=1 to automatically launch bunx wrangler dev after the checks complete; Astro will emit the sitemap during full builds.

Generated HTML and sitemap.xml remain ignored by git; commit only the source templates, partials, and the site config.

Developer workflow

flowchart TD
    Start([Edit Content]) --> Type{What changed?}

    Type -->|Templates/Partials| Build1["bun run build:home"]
    Type -->|Site Copy| Build1
    Type -->|Both| Build1

    Build1 --> Test{Need to verify?}

    Test -->|Quick Check| Preview["bun run dev<br/>(Wrangler preview)"]
    Test -->|Full Validation| Tests["bun test<br/>(Run test suite)"]
    Test -->|Just Content| Commit

    Preview --> Satisfied{Looks good?}
    Satisfied -->|No| Start
    Satisfied -->|Yes| Commit

    Tests --> Pass{Tests pass?}
    Pass -->|No| Start
    Pass -->|Yes| Commit

    Commit([Commit Changes])

    Dev[/"Active editing?<br/>Use bun run dev"/]
    Dev -.->|Hot reload| Build1

    Refresh[/"One command for all?<br/>bun run content:refresh"/]
    Refresh -.->|Build + Sitemap + Tests| Tests

    style Start fill:#e8f5e9
    style Commit fill:#e8f5e9
    style Build1 fill:#e3f2fd
    style Sitemap fill:#e3f2fd
    style Preview fill:#fff3e0
    style Tests fill:#fff3e0
    style Dev fill:#f3e5f5
    style Refresh fill:#f3e5f5

Core steps

  1. Edit source files in app/src/content/pages/en/ (for example, app/src/content/pages/en/studio/about/index.md or app/src/content/pages/en/tools/). Update shared site copy in app/src/content/site.json.
  2. Refresh content and run smoke tests with bun run content:refresh to keep feeds, navigation, and lastmod values current while surfacing errors early in CI and local workflows.
  3. Preview in Wrangler by setting CONTENT_WRANGLER_DEV=1 when you need to verify asset serving, redirects, and API endpoints in the Worker.

Set a robots directive in frontmatter when a page should be excluded from indexing or link following:

---
title: Draft Page
meta:
  robots: noindex, nofollow
---

Keep the directive on draft or internal-only pages until they are ready for publication.

Examples

Update the About page

  • Edit app/src/content/pages/en/studio/about/index.md (and app/src/content/pages/en/studio/about/studio/index.md if needed).
  • Run bun run build:home to refresh index.html and generated outputs.
  • Run bun test before committing.

Update site copy

  • Keep shared copy in app/src/content/site.json current.
  • When new strings power content templates, ensure placeholders and tone align with the surrounding voice.
  • Rebuild and verify navigation labels render correctly in the preview.
  • Namespace IDs: Prefix section and form IDs with the page slug or feature (home-newsletter-email, about-contact-form) to avoid collisions across partials.
  • Preserve published anchors: Fragments used in navigation or marketing (#contact, #studio) should be treated as permalinks. If you must rename an anchor, add an alias or redirect so existing links remain valid.
  • Match ARIA hooks: Update for, aria-labelledby, aria-controls, and data-* hooks whenever an ID changes to keep assistive technology mappings intact.
  • Use data attributes for scripts: Reach for data-* attributes when a hook is only needed for JavaScript and not for deep linking. This keeps anchor space clear for user-facing fragments.

Tips

  • Use bun run dev during active editing to preview updates to app/src/content/pages/ with hot reload.
  • Set SKIP_BUILD_HOME=1 before re-running tests if the site is already built and you only need to validate logic changes.
  • Keep accessibility in mind: confirm skip links, focus order, and contrast remain sound after content or layout adjustments.