This is a small static website for the Berkeley Center for Cosmological Physics, built with Astro and designed for GitHub Pages.
Most content lives in Markdown files under src/pages/.
src/pages/index.astrocontrols the home page because it has a custom layout.src/pages/research.mdcontrols Research.src/pages/people.mdcontrols People.src/pages/events.mdcontrols Events.src/pages/jobs.mdcontrols Jobs.src/pages/visiting.mdcontrols Visiting.src/pages/donate.mdcontrols Donate.
When editing a Markdown page, leave the block at the top in place:
---
layout: ../layouts/PageLayout.astro
title: "People"
description: "BCCP-affiliated directors, faculty, scientists, postdocs, students, alumni, and administrators."
---Edit the content below that block.
Images live in public/images/. Anything in public/ is copied directly into the finished site, so an image at public/images/example.jpg is referenced as /images/example.jpg.
Install dependencies once:
npm installStart a local preview:
npm run devBuild the production site:
npm run buildThe workflow in .github/workflows/deploy.yml builds and deploys the site whenever changes are pushed to the main branch.
For a temporary preview in a personal repository, create a normal GitHub repository, push this project, and enable GitHub Pages with Source set to GitHub Actions. The preview will be available at:
https://USERNAME.github.io/REPOSITORY-NAME/
For the current temporary preview plan:
https://sferraroastro.github.io/bccp-preview/
For the final BCCP deployment, move the repository to the BCCP GitHub organization or create a fresh BCCP repository. Then update .github/workflows/deploy.yml:
env:
SITE_URL: https://bccp.berkeley.edu
SITE_BASE: /Also add this file back:
public/CNAME
with this content:
bccp.berkeley.edu
In the GitHub repository settings:
- Go to
Settings->Pages. - Set
SourcetoGitHub Actions. - If using
bccp.berkeley.edu, configure that as the custom domain and make sure Berkeley DNS points to GitHub Pages.