Build code for the websites on thunderbird.net and start.thunderbird.net
CSS HTML JavaScript Python Shell
Clone or download
Permalink
Failed to load latest commit information.
assets Increase donate redirect delay to 5s and disable for IE/Edge. Aug 13, 2018
l10n_tools Remove debug statement from calendar script. Aug 2, 2018
langfiles Merge commit '992e80c1e14f7e1913422382a2c83fc85ca98c7f' as 'langfiles' Mar 13, 2018
media Fix download link tracking. Aug 9, 2018
start-page Improve donate links on all start pages to use dynamic currency like … Aug 3, 2018
website Update AMO -> ATB URLs. (#64) Aug 10, 2018
.gitignore Remove post-build static files from this repository, moved to tb-webs… Aug 9, 2017
.pyup.yml Add pyup config file to watch for insecure requirements. Aug 9, 2018
README.md Add localization instructions. Mar 15, 2018
babel.cfg Exclude Get Involved page from string extraction and only display lin… Apr 27, 2018
build-site.py Add .htaccess files for shortcuts to current sysreqs and release notes. Aug 14, 2018
build-start.py Improve donate links on all start pages to use dynamic currency like … Aug 3, 2018
helper.py Add .htaccess files for shortcuts to current sysreqs and release notes. Aug 14, 2018
product_details.py Add capability to get release dates for betas from product-details. Aug 8, 2017
requirements.txt Update icalendar to 4.0.2 to fix Issue #53. Aug 2, 2018
settings.py Improve donate links on all start pages to use dynamic currency like … Aug 3, 2018
translate.py Add gettext tools and start using gettext files for translation. Mar 14, 2018
wsgi.py Fix typo in wsgi python script. Aug 6, 2017

README.md

thunderbird-website

This repo contains the Thunderbird in-client Start page and the www.thunderbird.net website.

Build Instructions

Dependencies

On Ubuntu, you would need to use apt-get instead of yum, and similarly for different package managers. Also, the website is incompatible with LESS 3.0 or above.

pip install -r requirements.txt
git clone https://github.com/thundernest/thunderbird-notes.git thunderbird_notes
git clone https://github.com/mozilla/product-details-json
sudo yum install npm
sudo npm install -g less@2.7.2`

If you need the localizations to display pages translated from English into other languages:

git clone https://github.com/thundernest/thunderbird.net-l10n.git locale
l10n_tools/compile.sh

Run Build

There are two build scripts, one for the start page and one for www.thunderbird.net

  • python build-start.py for the start page.
    • This builds into the site directory.
  • python build-site.py for thunderbird.net.
    • This builds into the thunderbird.net directory.

View Website

In order to view the website, enter the thunderbird.net directory and run the following command to spin up an HTTP server

python -m SimpleHTTPServer 8000

You can then navigate to: http://127.0.0.1:8000 to view the website (you have to choose your location when you visit the page first, as it won't redirect you to your locale automatically).

Automated Builds

In general, you only need to manually build the website for testing and development purposes. Webhooks on each of the repositories trigger automatic rebuilds when:

Both of these update frequently enough(multiple times per week) that independent updates for localization are not necessary. Any triggered update will always use the most recent data available from all sources. If changes to one of the above repos don't produce any change in the built files, no actual update of the web server will occur.

Manual Site Updates

Occasionally you need to update the site manually, for example to move changes made to this repo to stage and production, or because the automation failed, or any reason like that. You'll need to either login to the control node as described in the https://github.com/thundernest/thundernest-ansible documentation or check out and setup the thundernest-ansible scripts on your local machine. That is also covered in the documentation for thundernest-ansible.

Assuming you are logged into the control node or have thundernest-ansible set up:

For stage:

cd thundernest-ansible
source files/secrets.sh
ansible-playbook plays/website-build.yml

For prod:

cd thundernest-ansible
source files/secrets.sh
ansible-playbook --extra-vars="branch=prod" plays/website-build.yml

The website-build.yml ansible script performs complete builds of the website, including both the start page and thunderbird.net itself.