Skip to content

Basic setup for an astro project with react and uswds

Notifications You must be signed in to change notification settings

paulathevalley/astro-react-uswds-starter

Repository files navigation

astro-react-uswds-starter

This is an example Astro project using Typescript, React, and SASS.

The UI is built with CSS and Javascript from USWDS (US Web Design System).

Getting started

Install dependencies:

npm install

Run the astro dev server:

npm run start

Build the static site:

npm run build

Internationalization (i18n)

This project relies on astro-i18n-aut to generate the routes for all of the configured languages in astro.config.mjs. For example, with English and Spanish configured, it will take pages/subpage/index.astro and generate both /subpage/index.html and /es/subpage/index.html.

Within each pages/*.astro file, astro-i18n-aut will tell us which locale is currently active, and our i18next integration handles finding and rendering the translated strings. Does this make sense? I hope so.

In v4.0, Astro added built-in support for i18n routing.

Astro’s Internationalization Guide

About

Basic setup for an astro project with react and uswds

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •