We use slack for talking about all #website
matters.
Please join the slack channel above. We will give you access to a CMS to edit content / create new posts.
The flow is like this:
- Create / Edit content on the CMS
- Save
- CMS will automatically help you request for approval. See this example
- Someone will approve and publish your changes
- See your new content live on https://taiwangoldcard.com
Alternatively, if you are already comfortable with git, then you can go to content
folder and edit the pages. Afterwards, raise a Pull Request (see below).
-
Feel free to contribute code by raising a Pull Request. Keep your code change as light as possible, with atomic commits so the whole thing is easier to review.
-
Alternatively, use the issues page to raise ideas / suggestions.
-
Content:
content/
-- Most copy should be edited here. -
HTML:
themes/compose/layout/
-- is where you want to modify the layout -
JS:
themes/compose/assets/js/
-- is where you want to modify or add new JS functionality -
CSS:
themes/compose/assets/sass/
-- is where is the styles are.hugo
will automatically translates it to CSS -
Output:
docs/
is the "build" folder, where GitHub look at to show the Taiwan Gold Card website
We have frontend tests (with cypress) to check if the website still works properly before being available on the website. All tests are ran automatically via github workflows when you push a commit. You can see them here. Each test has a video attached to it.
If you need to run the tests locally:
- First, install node / npm. This is required for the test executable. You may use Node Version Manager:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
-
At this repo's root, perform
npm install
. This will installcypress
, the automated test runner. -
Run the application
npm start
. -
Run the tests
npm test
. -
(Optional) To debug tests, you can
./node_modules/cypress/bin/cypress open
to view the interactive UI and select the tests to run:
When you push to master (or merge a Pull Request), a github action workflow will be automatically called, and deploy your changes to the website.
You can see how it works in the deploy workflow