Contributing
Architecture Overview
graph TD main["universtar-org/universtar"] deploy["Deploy to GitHub Pages"] bind["Bind to Cooresponding Domain"] main -->|Reuse the main repository| xmum["universtar-org/xmum"] --> deploy main -->|Reuse the main repository| mit["universtar-org/mit"] --> deploy main -->|Reuse the main repository| dots[...] --> deploy deploy --> bind
How it Works
This project is based on Hugo, which supports adding themes. The main repository universtar-org/universtar serves as a theme, so that other repositories could reuse it.
There are some GitHub actions used to:
- Fetch and update project data using
universtar-org/tools, which calls GitHub REST API. - Automatically upgrade the theme.
- Deploy the site to GitHub Pages.
Overall, this project is serverless, costless, and highly automatic.
Requirement
| Build Tool | Version |
|---|---|
Hugo | v0.153.3+extended+withdeploy |
Node.JS | v24.12.0 |
Go | 1.25.5 |
just (Optional) | v1.46.0 |
Set up Development Environment
-
Fork, clone and enter the repository
Create a fork on GitHub.
Then,
git clone git@github.com:universtar-org/universtar.git cd universtar/Replace
universtar-org/universtarwith your forked repository. -
Add Upstream
git remote add upstream https://github.com/universtar-org/universtar.git git fetch upstream -
Create a new branch (based on the
developbranch)git switch --create new-branch-name upstream/develop -
Install dependencies
For NixOS users, run one of the following command to enter dev shell.
direnv allow # With `direnv` nix develop # Without `direnv`For other uses, run this command to install dependencies via
npm:npm install -
Command list
Preview the website:
hugo server --config ./dev.yaml --disableFastRender # Or just devClean build caches:
rm -rf public resources ./hugo_stats.json # Or just gcFormat files:
npx prettier -w "./**/*.html" "./**/*.md" # Or just formatUpdate project data:
curl -L -o updater https://github.com/universtar-org/tools/releases/latest/download/updater-linux-amd64 chmod +x updater ./updater ./data/projects ; rm ./updater # Or just update -
Commit changes
The commit message should follow Conventional Commits.
-
Push changes
git push -u origin your/branch -
Open pull request
All changes should be submitted to
developbranch at first, so please remember to change the target branch in the pull request.