This is the code for the decred.org website.
git clone https://github.com/decred/dcrweb cd dcrweb
Start development web server:
You should now be able to access the site at
dcrweb is built using the Hugo site generator framework. The most frequently updated content sections live in the below locations:
||When adding a new release, please follow the file naming convention in the directory.|
||The current release as it appears in the footer|
||Edit timeline and stats section.|
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
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.
Importing new translations and content updates
When translations are added/updated in Transifex, pull the updates:
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
Updating the message catalog
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:
A Docker configuration is included for building the deployable images of dcrweb.
Building the Docker image for deployment
This builds the docker image
decred/dcrweb, which can then be run using:
docker run -d -p <local port>:80 decred/dcrweb:latest
Push to Dockerhub
Enter your Docker HUB credentials that has write access to the
docker push decred/dcrweb
Run in production
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.