This is the code for the decred.org website. It is built using the static site generator Hugo and utilizes Docker for testing and deployment.
To start a development web server at http://localhost:1313:
./bin/watch.sh
Run the HTML validator to ensure all of the generated files are syntactically correct:
./bin/test.sh
# Build the decred/dcrweb image.
./bin/build.sh
# Start the container.
docker run -d -p <local port>:80 decred/dcrweb:latest
The most frequently updated content sections live in the below locations:
Section | File |
---|---|
Media Coverage | src/data/news/coverage.yml |
Decred Journals | src/data/news/decred_journals.yml |
Software releases | src/data/news/software_releases.yml |
Press releases | src/content/news/*.md |
Wallets | src/data/wallets/wallets.yml |
Community channels | src/data/community/channels.yml |
Support channels | src/data/community/support.yml |
Publications | src/data/community/publications.yml |
Exchanges | src/data/exchanges/*.yml |
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.
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 regenerate the message catalog and push it to Transifex so that translators can update the localized message catalogs:
./bin/transifex_push.sh
dcrweb is licensed under the liberal ISC License.