The website for HackTJ 11.0.
git clone git@github.com:HackTJ/2024.git hacktj-website
pnpm install
We use SvelteKit.
mv hacktj-website hacktj-website-2024
git clone git@github.com:HackTJ/2024.git hacktj-website
cd hacktj-website
pnpm install
git reset "$(git commit-tree HEAD^"{tree}" -m "Push HackTJ 11.0 website")" # squash all commits into 1
git remote set-url origin git@github.com:HackTJ/2025.git
git push
pnpm update --latest --interactive
pnpm run format
pnpm run lint
pnpm run check
pnpm run switch event
: switch to the event repository (configures the project so that builds are for/2024
)pnpm run switch homepage
: switch to the homepage repository (configures the project so that builds are for/
)pnpm run dev
: starts a development server on port 3000 and watches files for changes, compiling them on the flypnpm run build
: compiles all files to thebuild/
directory but doesn't watch for changes or start a serverpnpm run preview
: starts a static server using the files inbuild/
pnpm run deploy event
: pushes to thegh-pages
branch of this repository and deploys the site to https://hacktj.org/2024pnpm run deploy homepage
: pushes to the hacktj.github.io repo and deploys the site to https://hacktj.orgpnpm run deploy all
: shortcut for bothpnpm run deploy event
andpnpm run deploy homepage
In the case that one of the endpoints (/2024 or /) doesn't work but the other does, immediately set up a hardcoded redirect in the nonfunctional repository to redirect to the correct site.
To test a production build locally:
pnpm run switch homepage
pnpm run build
pnpm run preview
To deploy a change:
pnpm run dev
- make your changes; when you're done, close the development server
pnpm run format; pnpm run lint
git add . && git commit
pnpm run deploy all
git push
- create a new repository under the HackTJ organization for each event
- the
deploy event
script doesn't commit the source code to the repository's main branch, it only commits the built website- you should commit the source code to the
main
branch each time you deploy- before you commit to
main
, always make sure you runpnpm run switch event
- if you need to, create a pre-commit hook to automatically do this
- before you commit to
- you should commit the source code to the
- don't run
git pull
afterpnpm run switch homepage
- only pull when you're set up for the event repository