This repo contains the source code for my personal website.
The site is built with Astro. It was initially generated from the Astro Portfolio theme with pnpm (pnpm create astro@latest -- --template portfolio). Note that a node_modules folder will still be created even if using pnpm. This is expected behavior - pnpm will link the contents of the folder to its content-addressable store.
Commands in package.json can be run from a terminal at the root of the project. Commands include:
| Command | Action |
|---|---|
pnpm install |
Install dependencies |
pnpm run dev |
Start local dev server at localhost:4321 (use --port to change default port) |
pnpm run build |
Build production site to ./dist/ |
pnpm run preview |
Preview build locally before deploying |
pnpm run astro ... |
Run CLI commands like astro add, astro check |
pnpm run astro -- --help |
Get help using the Astro CLI |
pnpm -s dlx @astrojs/upgrade |
Update Astro and related dependencies |
Media assets and other large files are stored with Git LFS.
The dev container configuration provides a cloud development environment compatible with both GitHub Codespaces and Codex Web.
The dev container configuration uses the Node.js official image instead of the Codex universal base image because of the large size of the Codex image. The configuration relies on the default dev container command override so the container stays running long enough for initial setup and lifecycle scripts to complete. After the initial setup is completed, repository-specific setup is completed with a postCreateCommand that runs a bootstrap script. The bootstrap script initializes Git LFS, installs dependencies, and runs check and build commands.
In order to maintain a consistent runtime, the Node.js version is set with engines.node in package.json. Vercel respects this value, and the GitHub Actions setup-node action does also if configured with node-version-file: package.json. The dev container configuration also needs to specify the Node.js version in order to pull the proper container.
This setup script is then added to each Codex Web environment:
#!/usr/bin/env sh
set -e
repo="br3ndonland/br3ndonland.github.io"
script="https://raw.githubusercontent.com/$repo/HEAD/.devcontainer/bootstrap.mjs"
curl -fsSL "$script" | /usr/bin/env node - "$repo"- The site is deployed with GitHub Pages to br3ndonland.github.io using a GitHub Actions workflow. The
astro buildstep includes--site "https://${GITHUB_REPOSITORY##*/}"so that the site URL can be set for GitHub Pages without having to hard-code it in the Astro config file. - The site is also deployed with Vercel to other domains including bws.bio.
Content in this repository authored by Brendon Smith is licensed under CC BY-SA 4.0. CC BY-SA licenses include a "ShareAlike" requirement - "If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original." Wikipedia uses this license, so licensing this repository's content under a CC BY-SA license allows Wikipedia and Wikimedia Commons content to be used. Although Creative Commons licenses are irrevocable, CC BY-SA 4.0 is one-way compatible with GPLv3 (CC BY-SA 4.0 -> GPLv3), allowing relicensing under GPLv3 if necessary. See the Creative Commons compatible licenses page for further details.
The software code in this repository is not intended for reuse, so the package.json lists the source code as UNLICENSED. The CC BY-SA license used for the content in this repository is not intended for the software code. CC BY-SA licenses are not generally recommended for software. However, CC BY-SA 4.0 is listed on the Software Package Data Exchange (SPDX) with identifier CC-BY-SA-4.0, and SPDX-listed licenses can be used with npm in package.json.