Giter Site home page Giter Site logo

dcrweb's Introduction

dcrweb

This is the code for the decred.org website.

Build Status ISC License

Downloading web site code

Make sure you have git installed.

git clone https://github.com/decred/dcrweb

Development

  1. Install prerequisites:

  2. Clone repo

    git clone https://github.com/decred/dcrweb
    cd dcrweb
  3. Start development web server:

    bin/watch.sh

You should now be able to access the site at http://localhost:1313

Editing content

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/wallets/links.yml
Current release src/data/wallets/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
History src/data/history/*.yml 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.

Testing

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

Localization

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:

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

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:

bin/transifex_push.sh

Deployment

A Docker configuration is included for building the deployable images of dcrweb.

Prerequisites

  • docker

Building the Docker image for deployment

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

Push to Dockerhub

docker login

Enter your Docker HUB credentials that has write access to the decred/dcrweb repository.

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.

License

dcrweb is licensed under the liberal ISC License.

dcrweb's People

Contributors

jholdstock avatar peterzen avatar karamble avatar dajohi avatar jolan avatar rmykolas avatar zeroasic avatar alexlyp avatar jzbz avatar oktapodia avatar degeri avatar nickboariu avatar stabbarn avatar jujhar avatar hypernoob avatar jcvernaleo avatar infertux avatar noahpierau avatar orthomind avatar pvtwarren avatar ttneverdies avatar d7km avatar computerarts avatar victorgcramos avatar plabarta avatar marcopeereboom avatar lukebp avatar enviable avatar knightjdr avatar isaias avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.