Skip to content

Commit

Permalink
Fix amp-geo docs: s/AMPBind/AmpBind (#15056)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbenz authored and lannka committed May 15, 2018
1 parent 8203855 commit 4058693
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions extensions/amp-geo/amp-geo.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,13 @@ This CSS hides the element that has the `foo` class until `amp-geo` has loaded a

### Integration with amp-bind

If the `AMPBind` key is present in the configuration, `amp-geo` inserts an `amp-state` tag containing the current country and group information. Using the football example above, set the `AMPBind` flag to true to enable `amp-bind` integration.
If the `AmpBind` key is present in the configuration, `amp-geo` inserts an `amp-state` tag containing the current country and group information. Using the football example above, set the `AmpBind` flag to true to enable `amp-bind` integration.

```html
<amp-geo layout="nodisplay">
<script type="application/json">
{
"AMPBind": true,
"AmpBind": true,
"ISOCountryGroups": {
"soccer": [ "au", "ca", "ie", "nz", "us", "za" ],
"football": [ "unknown" ]
Expand Down Expand Up @@ -194,7 +194,7 @@ The `amp-geo` JavaScript file is served with a 30-minute cache lifetime (`Cache-

The `amp-geo` component supports pre-rendering. If the document is served from the publisher origin and it already contains a class matching `amp-iso-country-*` `amp-geo` respects that value. `amp-geo` will use the supplied country and configuration to supply data to cooperating AMP extensions (e.g., `amp-consent`). If a pre-rendered country code is detected, the document will not be modified by `amp-geo` to add classes for country group or `amp-state`.

However, if the document is served via one of the [AMP caches](https://github.com/ampproject/amphtml/blob/master/caches.json), `amp-geo` removes and replaces any supplied geolocation classes and, if the `AMPBind` configuration key is true, updates `<amp-state id="ampGeo">` accordingly. This allows publishers to use their own geolocation code when the document is served directly from their origin while retaining dynamic configuration when served from a cache.
However, if the document is served via one of the [AMP caches](https://github.com/ampproject/amphtml/blob/master/caches.json), `amp-geo` removes and replaces any supplied geolocation classes and, if the `AmpBind` configuration key is true, updates `<amp-state id="ampGeo">` accordingly. This allows publishers to use their own geolocation code when the document is served directly from their origin while retaining dynamic configuration when served from a cache.

Caches that wish to pre-render `amp-geo` should [open an issue](https://github.com/ampproject/amphtml/issues/new) requesting to be removed from the pre-render override.

Expand Down

0 comments on commit 4058693

Please sign in to comment.