guardian/frontend — pull request #4184 by janua (2014-05-12 15:51:43+00:00)
Title: New SEO data

Finally, after a long time working on this, and a lot of figuring out;
This PR gives us the new methods of setting the SEO elements of a path.

We can now set from the tool:
- Section
- Web Title
- Title
- Description

#### General Logic
We base most of this work around the `SeoData` `case class` and `object`.

For both `Section` and `WebTitle`, if it is set in `facia-tool` (from `config.json`, or `ConfigAgent`), then use that. Otherwise use what comes from the Content API for a given `path`. Otherwise generate SEO data from the `ID/Path`.

`Title` and `Description` are both generated from `webTitle` IF they are not set by `facia-tool`.

`analyticsName` is just `GFE:`.

#### `NewSeoSwitch` Switch
This is all based around the `NewSeoSwitch`. It is set to expire on the `30th May`.

#### Other Changes
There are some other changes you should know about.
- There is now a `ConfigAgent` `object` in common, which can be used by any project. The internal agent of this is `lazy` and will only be refreshed if explicitly told to do so from the project `Global` object, or in some other way. This means the project specific concrete objects have been removed.
- `FaciaPage` now extends `MetaData`, and this replaces `FrontPage`. The templates now always just take a `FaciaPage`, and inside this we decide to use either the new SEO or the old method of generating the SEO, via the `NewSeoSwitch`.

#### Todo

This PR has become large, so instead of continuing work, I have decided to break here and do the rest in seperate PRs. What's left:

- We have asked the Content API to start indexing `description` from `R2 Tools`, as there is one that exists. So this will need to be updated to use the `description` from the Content API once that appears in there.
- `Title` which is current used as the `HTML Title` needs more work. Currently it inserts pipes after the set `title` field from the tool. `(

| The Guardian)`

@stephanfowler @kelvin-chappell @gklopper