1
0
Fork 0
web2019/README.md

41 lines
1.1 KiB
Markdown
Raw Normal View History

2019-07-20 11:31:24 +08:00
# M-Labs.hk website source code
2019-07-03 17:52:11 +08:00
2019-07-20 11:31:24 +08:00
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. For deployment, see the nix-scripts repository. Commits to https://git.m-labs.hk/M-Labs/web2019.git are automatically deployed to m-labs.hk through Hydra.
2019-07-03 17:52:11 +08:00
2019-07-20 11:33:02 +08:00
Clone the project:
2019-07-20 11:32:13 +08:00
2019-07-03 17:52:11 +08:00
```
2019-07-20 11:31:24 +08:00
git clone https://git.m-labs.hk/M-Labs/web2019.git
cd web2019
2019-07-03 17:52:11 +08:00
```
2019-07-20 11:33:02 +08:00
Install Zola.
Start with targeting `m-labs.hk` domain:
2019-07-03 17:52:11 +08:00
```
2019-07-20 11:31:24 +08:00
zola serve
2019-07-18 22:32:15 +08:00
```
2021-03-22 17:45:50 +08:00
Environmental variable `DOMAINNAME` can be specified to [substitute links on the website](#domain-handling).
To build the .bundle.js from .jsx files:
2021-03-22 17:45:50 +08:00
```
nix-shell -p nodejs
npm install
npm run build
2021-03-22 17:45:50 +08:00
```
Development builds are also available. `npm run build-dev` to re/build once, or `npm run start-dev` for incremental
continuous builds as source files change.
## Domain handling
Environmental variable `DOMAINNAME` controls only the following links on the website:
* email `mailto:` links
* hook for the RFQ server (`window.API_RFQ`) variable
If absent, `DOMAINNAME` defaults to `m-labs.hk`.