While the tobacco industry and its allies have always opposed tobacco control measures, their strategies have now become more determined, focussed, misleading, aggressive and sophisticated.
Until now there has been no single source explaining how tobacco industry players act and how governments and the public health community can respond to their arguments.
The Tobacco Control Playbook is a living collection of evidence-based arguments and responses, developed by tobacco control leaders to counteract and succeed against the tobacco industry.
The Master branch of this repository holds the publishing system, and the live website is served from the docs/
folder.
The domain name tobaccoplaybook.net
resolves to cloudfront.com, who provides a cache and the https-rewrite service.
The website is a static site, generated by the custom builder (src/build.js
) run by node.js.
Configure settings in config.js
.
Site content is in a separate "content-repo" at tobaccoplaybook/content.
All content is expressed in Markdown files, located in the following directories below content-repo (as configured in config.js > contentSource
):
Dir | Description |
---|---|
/en, /ru | available languages. Subdirs structure is expected to match. |
front | content for the index page |
pages | content for auxiliary pages, e.g. About |
arguments | main content files |
All files accept YAML frontmatter
Key | Example | Description |
---|---|---|
Title | Title | the title of the argument |
Authors | John Doe, Michael Smith | one or all document authors |
ApprovedBy | John Doe | the name (and position?) of the person who has approved the publishing of this document |
ApprovedDate | 2016-09-20 | date, used internally for version control |
Revision | 1 | version number (please increment each time the document is updated/changed) |
PublicDate | 2016-09-23 | date on which this document will be published on the website (and displayed across the website) |
HeaderImage | https://unsplash.com/photos/8-o4p16GzSc | the URL to an image you like from unsplash.com |
Tags | Tag, Another tag, One more | keywords for this document |
Short | A 140 char summary | twitter-friendly super condensed summary |
SourceFile | test.docx | original filename of this document |
ReferenceAccessDate | 2016-09-20 | date, when the references was last checked |
ArgumentId | 001 | informal ID, displayed in the index listing |
langugage
/arguments/000
_name_of_this_page.md, where:
language
is a directory containing all content files for a given language (e.g. 'en')000
denotes a unique page ID
Examples:
/en/arguments/001_page_number_one.md
/en/arguments/002_page_number_two.md
/no/arguments/001_side_nummer_en.md
/no/arguments/002_side_nummer_to.md
Make sure your system has a working installation of node, npm, sh and git.
To find out, type
$ node --version
# (v7.4.0 or later is recommended)
Make sure your git is setup and working too.
Then obtain the source code:
# Create a project directory:
$ mkdir tobaccoplaybook-project
$ cd tobaccoplaybook-project
# Get a copy of the repositories
$ git clone https://github.com/tobaccoplaybook/site.git
$ git clone https://github.com/tobaccoplaybook/content.git
# Install its dependencies:
$ cd site
$ npm install
$ node index.js
# (or npm start)
This will start the dev server, which
- Rebuilds the site into
build/
- Starts a live-reload server (so you can browse the result) at http://127.0.0.1:8181/
- Starts a file wathcer, that rebuilds when sourcefiles change.
Use the included deploy.sh
script to commit and push all local changes live-reload.
$ ./deploy.sh
Use the included publish.sh
script to publish the local website
$ ./publish.sh
Code (https://github.com/tobaccoplaybook/site) is UNLICENSED
Content (https://github.com/tobaccoplaybook/content) is licensed under CC-BY-4.0