Skip to main content

Examples

The quickest way to get started is to copy the starter example in the examples/ directory. It’s a self-contained Astro project with the theme pre-configured, a GitHub Pages deploy workflow, and example content you can replace with your own.

Quick start

Clone the repository and copy the example into a new directory:

git clone https://github.com/ANUcybernetics/astro-theme-university.git
cp -r astro-theme-university/examples/base my-site
cd my-site
pnpm install
pnpm dev

The example pins the theme to the release it shipped with. To move to a newer release later, change the tag in package.json and run pnpm install.

What’s in the base example

A minimal themed site with a single pages content collection. Good for project sites, research group pages, and general content.

Includes:

Deployment

Push the copied site to a GitHub repository, enable GitHub Pages with “GitHub Actions” as the source, and every push to main builds and deploys. The workflow derives SITE_URL and BASE_PATH from the repository name, so a project site lands at https://<owner>.github.io/<repo>/ with every internal link carrying the /<repo>/ prefix. For another host, or a GitLab Pages instance, set the two variables to match and see deploying.

Course websites

A course site is the same starter plus astro-course-university, which adds the content model (topics, labs, assessments, people), a build-time check that every cross-reference resolves, and a generated JSON API. See the brand packages and course sites guide.

Next steps

Once you have the example running, edit src/site-config.ts to set your site name and navigation links. See configuration for details on all the available options.