GithubHelp home page GithubHelp logo

skeleton's Introduction

Configuration files for NextGen fronts

The config.json file in this repo determines which fronts have which article collections on them.

Requirements

Setup

$ npm install

Usage

To upload changed (to DEV by default)

$ grunt upload

To a specific env

$ ENVIRONMENT=code grunt upload

To upload to S3, it will look for access_key and secret_key in your ~/.s3cfg file. See here for creating one.

Edit front pages contents

Requirements

If the fronts tool is inaccesible or broken, you can edit the contents of fronts by modifying files stored on S3, as follows.

(1) Install jslint for JSON validation - a HIGHLY recommended precaution:

sudo npm install -g jslint

(2) In config.json file, look down the paths in the fronts property for the page you need to edit - then find the reference to the collection you need to edit within it. (DO NOT edit config.json - just use it to identify collections that you need to edit).

(3) Switch to a temporary working directory elsewhere, then download the live "collections":

s3cmd sync s3://aws-frontend-store/PROD/frontsapi/collection ./

(You could just download individual ones; up to you.)

Find and edit the appropriate collection.json file. In the example above, the file would be...

collection/uk/news/regular-stories/collection.json

...and would look something like (unimportant properties ommited):

{
  "live": [
    {
        "id" : "world/video/2013/oct/11/us-government-shutdown-stalemate-talks-video"
    },
    {
        "id" : "world/2013/sep/30/nsa-files-edward-snowden-gchq-whistleblower"
    }
  ]
}

(3) add/remove/reorder content by editing the objects in the `live' array. Then CHECK IT IS VALID JSON:

find ./ -name *.json | xargs jslint

Finally, upload the collection files:

 s3cmd sync --acl-public ./collection s3://aws-frontend-store/PROD/frontsapi/

(You could just upload individual files; up to you.)

Important be careful to throw away your local copy of these collections. These are rapidly edited, and you risk overwriting later edits by holding on to them.

skeleton's People

Contributors

stephanfowler avatar janua avatar phamann avatar

Watchers

Grant Klopper avatar Aodh O Lionaird avatar James Rodgers avatar Mark Butler avatar theguardian.com continuous integration avatar  avatar Marc Hibbins avatar Zofia Szopka avatar Cantlin Ashrowan avatar Fabio Crisci avatar Chris Mulholland avatar James Cloos avatar Selwyn McCracken avatar Nathaniel Bennett avatar Raul Tudor avatar Tom Forbes avatar George Haberis avatar Sam Morris avatar Kelvin Chappell avatar Gideon Goldberg avatar  avatar Josh Holder avatar Emmanuelle Franquelin avatar Steve Vadocz avatar Leigh-Anne Mathieson avatar  avatar JamieB avatar  avatar  avatar Chris Fenn avatar Lydia Shepherd avatar Frank Hulley-Jones avatar Natalia Baltazar avatar Luke Taylor avatar Prout avatar Shannon Maher avatar Zef avatar  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.