www Astro website
Overview
Work on the Astro site in www/: update content, add pages or news posts, and adjust styling while following the local design system.
Quick Start
- •Install deps:
cd www && npm install - •Run dev server:
npm run dev - •Build:
npm run build - •Preview build:
npm run preview
Project Map
- •Use
www/src/pages/for route files (e.g.,index.astro,manual.astro,news/). - •List news posts in
www/src/pages/news/index.astroviaAstro.glob; exporttitleanddatefrom each post. - •Wrap pages with
www/src/layouts/Layout.astro; keepNav, global CSS, fonts, and analytics wired in. - •Edit the main nav in
www/src/components/Nav.astro. - •Treat
www/src/styles/global.cssas the home for global typography, colors, and layout defaults. - •Place static assets in
www/public/(images, icons). - •Follow the design system in
www/DESIGN.md. - •Avoid editing
www/dist/directly (build output, ignored by git).
Conventions
- •Wrap pages with
Layoutand settitleplusdescriptionwhen available. - •Put shared styling in
www/src/styles/global.css; keep page-specific styles in each.astrofile's<style>block. - •Follow
www/DESIGN.md: bold, high contrast, thick borders, sharp corners, palette-driven accents. - •Preserve existing typography: Fira Mono for headings, system-ui for body.
- •Keep assets in
www/public/and reference by absolute path (e.g.,/screenshot.png).
Common Tasks
Update content
- •Edit the target
.astrofile inwww/src/pages/orwww/src/pages/news/. - •Adjust local styles in the same file if layout changes are needed.
Add a new page
- •Create
www/src/pages/<route>.astro. - •Use
Layoutand providetitle/description. - •Add a nav link in
www/src/components/Nav.astroif the page should appear in the top nav.
Add a news post
- •Create
www/src/pages/news/<slug>.astro. - •Export
titleanddateas strings. - •Use
Layoutand include a back-link to/news/. - •Rely on
Astro.globin/news/to surface the post automatically.