The static website for HKUST Tech Club, generated by Hugo
- Install Hugo globally
- Install yarn globally
# clone the github repository
git clone https://github.com/hkusttech/hkusttech.github.io.git
cd hkusttech.github.io # change to the project directory
yarn # install dependencies
The following steps can be done by GitHub Desktop
git checkout dev # Switch to the dev branch
git branch # Verify that you are in dev
git pull # receive the latest update
master
branch is used for the deployed website. It is required by GitHub for an organization pagedev
branch is used for hosting the source codes.
- Simple. No need to modify ANY HTML
- Inside the
content/events
folder- Copy
template
folder (or create a new folder) as[new event name]
- Put images (*.png, *.jpg, ...) and other content for this event
- Copy
template.md
and rename it as a[new event name].md
- Change from
draft: true
todraft: false
- Change the date
- Modify the tags
- Edit the content using markdown language. Markdown reference
- Change from
- Copy
yarn run debug # Debug, all draft content will be included
yarn run build # Build the web site content in the public folder (only non-draft content will be included)
The following steps can be done by GitHub Desktop
git checkout dev # Switch to the dev branch
git add . # Added all changes
git commit -m [msg] # Commit all changes to the dev branch
After that, run the following to deploy the dev
branch to GitHub master
branch
yarn run deploy # Deploy the dev branch to the github page.