This is the website for the GSA SmartPay program.
It is a statically-generated site built using Astro to run on cloud.gov pages.
Inside of the project, you'll see the following folders and files:
/
โโโ sass/ /* USWDS sass components */
โโโ public/ /* Static, unprocessed assets (css, js, โฆ) */
โโโ src/
โ โโโ assets/ /* Sssets like images used in code */
โ โโโ config/ /* Extra js processing */
โ โโโ content/ /* Primary markdown content */
โ โโโ components/ /* Eeusable Astro components */
โ โโโ layouts/ /* Large astro components for pages */
โ โโโ pages/ /* This directorty maps to the urls of the site
โ โโโ about/
โ โโโ ...
โ โโโ plugins/ /* Custom processing of markdown */
โโโ package.json
Astro looks for .astro
or .md
files in the src/pages/
directory. Each page is exposed as a route based on its file name.
There's nothing special about src/components/
or src/layouts
but that's where we like to put any Astro components.
Any static assets, like images, can be placed in the public/
directory.
All commands are run from the root of the project, from a terminal:
Command | Action |
---|---|
npm install |
Installs dependencies |
npm run dev |
Starts local dev server at localhost:3000 |
npm run build |
Build your production site to ./dist/ |
npm run preview |
Preview your build locally, before deploying |
npm run astro ... |
Run CLI commands like astro add , astro check |
npm run astro -- --help |
Get help using the Astro CLI |
This site uses the U.S. Web Design System (USWDS). To customize USWDS styles you will need to edit the SASS components and styles in the /sass
directory. Changes here will not be reflected in the site until you rebuild the css. To build the css, run gulp:
npx gulp compile --gulpfile gulpfile.cjs
This will rebuild the static assests and place them in the /public
directory. To learn more, visit USWDS Getting started for developers .
Cloud.gov Pages manages the deployment of this site by watching for changes to the github repository. Changes to the main
branch will be deployed to production. Changes to staging will be deployed to the demo site. For other branches Cloud.gov Pages will create a preview specific to that branch. See Pages Documentation for specific information.
Astro documentation. Astro also maintains a helpful Discord server.