This repository contains the public website for the Portland State Power Lab at Portland State University.
The live site is available at:
https://portlandstatepowerlab.github.io
The website is built with:
- Astro
- TypeScript
- HTML and CSS
- GitHub Pages
- GitHub Actions
The website is statically generated. It does not require a database or server-side application.
Local development requires:
- Node.js 24 or newer
- npm 11 or newer
Check the installed versions:
node --version
npm --versionFrom the repository root, run:
npm installStart the local Astro development server:
npm run devThen open:
http://localhost:4321
Stop the development server with Ctrl+C.
Create a production build:
npm run buildAstro writes the generated website to the dist/ directory.
The dist/ directory is generated automatically and should not be committed.
After running npm run build, preview the generated website locally:
npm run preview.
├── .github/
│ └── workflows/
│ └── deploy.yml
├── public/
├── src/
│ ├── components/
│ ├── data/
│ ├── layouts/
│ ├── pages/
│ └── styles/
├── astro.config.mjs
├── package.json
└── tsconfig.json
Reusable website components are stored in:
src/components/
Current shared components include:
Header.astroFooter.astroPageHeader.astro
Structured website content is stored in:
src/data/
Current data files include:
people.tsprojects.tspublications.ts
Update these files when adding people, projects, or publications.
Website pages are stored in:
src/pages/
Astro creates routes based on filenames. For example:
src/pages/research.astro → /research
src/pages/projects.astro → /projects
src/pages/people.astro → /people
The website is deployed automatically through GitHub Actions.
Every push to the main branch triggers:
.github/workflows/deploy.yml
The workflow:
- Checks out the repository.
- Builds the Astro website.
- Uploads the generated static files.
- Deploys the site to GitHub Pages.
Deployment status can be reviewed in the repository’s Actions tab.
Create a branch before making changes:
git switch -c descriptive-branch-nameAfter making changes, verify the website:
npm run buildCommit the changes:
git add .
git commit -m "Describe the website change"Push the branch:
git push -u origin descriptive-branch-nameThen open a pull request into main.
- Use verified information for people, projects, and publications.
- Do not publish private contact details without permission.
- Do not commit credentials, access tokens, or API keys.
- Add descriptive alternative text to meaningful images.
- Keep project and publication descriptions clear for non-specialist visitors.
- Mark inactive projects appropriately rather than silently deleting them.
The website uses the Power Lab’s Portland State color palette.
Primary colors include:
PSU green #6A7F10
PSU light green #A8B400
PSU blue #00759A
PSU light blue #A1D8E0
PSU gray #474334
Additional supporting colors are defined in:
src/styles/global.css