This is the code for the decred.org website.
Make sure you have git installed.
git clone https://github.com/decred/dcrweb
-
Install prerequisites:
- Hugo
- Docker
-
Clone repo
git clone https://github.com/decred/dcrweb cd dcrweb
-
Start development web server:
bin/watch.sh
You should now be able to access the site at http://localhost:1313
dcrweb
is built using the Hugo site generator framework. The most frequently updated content sections live in the below locations:
Section | File | Comments |
---|---|---|
Press releases | src/content/press/*.md |
When adding a new release, please follow the file naming convention in the directory. |
Press coverage | src/data/press/coverage.yml |
|
Download links | src/data/downloads/links.yml |
|
Current release | src/data/downloads/current_release.yml |
The current release as it appears in the footer |
Contributors | src/data/contributors/*.yml |
Avatar images: src/assets/images/contributors |
Community channels | src/data/community/channels.yml |
Logo images: src/assets/images/community |
Exchanges | src/data/exchanges.*.yml |
Logo images: src/assets/images/exchanges |
The other sections live under src/layouts
. These pages are implemented as Hugo templates and are localized. The message catalogs can be found in src/i18n
, when making changes in the templates, you'll want to keep the strings in the catalogs, please follow the naming scheme in the existing templates.
Run the HTML validator to make sure all of the generated files are syntactically correct. (The script depends on yarn
and docker
being installed.)
yarn && yarn test
The below commands must be run when either the content changes or there are updates in the translations in Transifex. You'll first need to install the Transifex client.
When translations are added/updated in Transifex, pull the updates:
bin/transifex_pull.sh
When you run this for the first time, you'll be asked to log in with your Transifex username/password.
To push the changes to staging:
git commit -m'Translation update'
git push origin
When the master content changes in the HTML files, you'll need to re-generate the message catalog and push it to Transifex so that translators can update the localized message catalogs:
bin/transifex_push.sh
A Docker configuration is included for building the deployable images of dcrweb.
- docker
bin/build.sh
This builds the docker image decred/dcrweb
, which can then be run using:
docker run -d -p <local port>:80 decred/dcrweb:latest
docker login
Enter your Docker HUB credentials that has write access to the decred/dcrweb
repository.
docker push decred/dcrweb
docker pull decred/dcrweb
docker run -d --rm -p <local port>:80 decred/dcrweb:latest
Runs the docker image exposing the specified local port.
dcrweb is licensed under the liberal ISC License.