First-time working on this project? Follow these steps, assuming no prior programming experience:
- Set up Git if you haven't already.
- Download your favorite code editor (we recommend Visual Studio Code).
- Download nvm.
- Install Bun.
- In your terminal, run
nvm install --lts(ornvm install ltsfor Windows) - Clone this repository. For VSCode, this means you will do the following:
- Click the topmost file explorer icon in the sidebar.
- Click on "Clone Repository".
- Paste in the URL
https://github.com/ScottyLabs/cmu-guide.gitwhen prompted. - Open the repository.
- Open the terminal in your project. For VSCode, you can use the shortcut ctrl+` (backtick, same button as tilde ~).
- Run
bun install.
Do the following whenever you want to work on the project:
- Run
bun dev. This starts a local dev server for this website! - Follow the localhost link in the terminal output. For VSCode, hold down command or ctrl when clicking on the link.
Now, whenever you edit a file and save it (command+s or ctrl+s), your local server will automatically reload to reflect your changes! This means you don't have to quit and rerun the dev command whenever you make changes, as long as your server is running.
To contribute your changes to the repo:
Your pull request will be reviewed, and if merged, it will be published to cmu.guide!
This project uses Bun. All commands are run from the root of the project, from a terminal:
| Command | Action |
|---|---|
bun install |
Installs dependencies |
bun dev |
Starts local dev server at localhost:4321 |
bun build |
Build your production site to ./dist/ |
bun preview |
Preview your build locally, before deploying |
bun astro ... |
Run CLI commands like astro add, astro check |
bun astro -- --help |
Get help using the Astro CLI |
Since pagefind requires a build artifact, search will only work on bun preview after running bun build.
Astro looks for .md files in the src/pages/ directory. Each page is exposed as a route based on its file name. Any static assets, like images, should be placed in the public/ directory.
For more comprehensive instructions, visit the visit the Markdown content docs, or more generally, the Astro documentation.
Favicons were generated using favicon-generator.org.