Skip to content

Commit

Permalink
Fix docs typos (#39604)
Browse files Browse the repository at this point in the history
* Fix docs typos

* Fix relative links

* Fix links

* Fix one more link
  • Loading branch information
szepeviktor authored Nov 9, 2023
1 parent f996464 commit 034dc49
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 37 deletions.
2 changes: 1 addition & 1 deletion docs/spec/amp-3p-video.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Internally these players load an iframe whose page communicates with the outer d

## I want to contribute my vendor-specific player

You probaby do **_not_** need to build your own player.
You probably do **_not_** need to build your own player.

The `amp-video-iframe` playback interface supports the following methods, which we believe cover the vast majority of cases AMP documents necessitate:

Expand Down
4 changes: 2 additions & 2 deletions docs/spec/amp-actions-and-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ event.response</pre></td>
</tr>
<tr>
<td><code>changeToLayoutContainer</code></td>
<td>Update's <code>amp-list</code>'s layout to <code>layout="CONTAINTER"</code> to allow <a href="../extensions/amp-list/amp-list.md#dynamic-resizing">dynamic resizing</a>.</td>
<td>Update's <code>amp-list</code>'s layout to <code>layout="CONTAINER"</code> to allow <a href="../../extensions/amp-list/amp-list.md#dynamic-resizing">dynamic resizing</a>.</td>
</tr>
<tr>
<td><code>refresh</code></td>
Expand Down Expand Up @@ -708,7 +708,7 @@ actions that apply to the whole document.
<tr>
<td><code>navigateTo(url=STRING, target=STRING, opener=BOOLEAN)</code></td>
<td>
<p>Navigates current window to given URL, to the optional specified target if given (currenly only supporting <code>_top</code> and <code>_blank </code>). The optional <code>opener</code> parameter can be specified when using a target of <code>_blank</code> to allow the newly opened page to access <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/opener"><code>window.opener</code></a>.</p>
<p>Navigates current window to given URL, to the optional specified target if given (currently only supporting <code>_top</code> and <code>_blank </code>). The optional <code>opener</code> parameter can be specified when using a target of <code>_blank</code> to allow the newly opened page to access <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/opener"><code>window.opener</code></a>.</p>
<p><strong>Caveat:</strong> Using normal <code>&lt;a&gt;</code> links is recommended wherever possible since <code>AMP.navigateTo</code> is not recognized by web crawlers.</p>
</td>
</tr>
Expand Down
35 changes: 17 additions & 18 deletions docs/spec/amp-cache-transform.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The [Signed Exchanges](https://wicg.github.io/webpackage/draft-yasskin-http-origin-signed-responses.html)
(**SXG**) spec introduces a [new format](https://wicg.github.io/webpackage/draft-yasskin-http-origin-signed-responses.html#application-signed-exchange)
for delivery of web content. AMP's [use of SXG](https://amphtml.wordpress.com/2018/01/09/improving-urls-for-amp-pages/)
requires additional information to enable proper content negotation on a URL.
requires additional information to enable proper content negotiation on a URL.

### "Understands" vs "Prefers"

Expand All @@ -25,15 +25,14 @@ indicates the latter.

### Target-specific constraints

AMP SXG are intended for [privacy-preserving
prefetch](https://wicg.github.io/webpackage/draft-yasskin-webpackage-use-cases.html#private-prefetch)
AMP SXG are intended for privacy-preserving prefetch
from a referring page (such as a Google Search results page) to a coordinating
AMP cache (such as the Google AMP Cache). If the referrer wishes to prefetch
subresources as well, they must also be served from a coordinating AMP cache, in
order to preserve privacy. In order for those subresources to be _useful_, they
must be referenced by the signed HTML page.

Therefore, the requestor of an SXG may require the origin to produce an SXG
Therefore, the requester of an SXG may require the origin to produce an SXG
tailored to the AMP Cache that is requesting it, by rewriting its subresource
URLs appropriately.

Expand All @@ -53,13 +52,13 @@ of those transforms. This allows the AMP cache to:

## Solution

The presence of the `AMP-Cache-Transform` header indicates that the requestor
The presence of the `AMP-Cache-Transform` header indicates that the requester
would prefer an `application/signed-exchange` variant of the resource at the
given URL, but would accept a non-SXG variant. If a requestor sends this, it
given URL, but would accept a non-SXG variant. If a requester sends this, it
should also explicitly include the relevant
`application/signed-exchange;v=something` in its `Accept` header, so that the
responder knows which versions of the SXG standard are supported by the
requestor.
requester.

The value of the header indicates target-specific constraints on the transformed
AMP within the SXG. If a server is unable to meet those constraints, it should
Expand Down Expand Up @@ -88,7 +87,7 @@ For each identifier:

1. If the identifier contains a `v` parameter, then its value represents a set
of AMP transform versions. The server should respond with an SXG only if it
can produce one of the versions in that set (see [Version negotation](#version-negotiation)).
can produce one of the versions in that set (see [Version negotiation](#version-negotiation)).
2. If the identifier contains any parameters besides those mentioned above,
then this identifier cannot be satisfied. The server should attempt to match
the next one. (This reserves the parameter space for future additional
Expand All @@ -97,7 +96,7 @@ For each identifier:
prefetching intermediary, and therefore its subresource URLs needn't be (but
may be) rewritten.
4. Otherwise, if the identifier is an `id` from the list in
[caches.json](../build-system/global-configs/caches.json), then the SXG should have its subresource URLs
[caches.json](../../build-system/global-configs/caches.json), then the SXG should have its subresource URLs
rewritten. That `id`'s corresponding `cacheDomain` indicates the
fully-qualified domain name that forms the basis for the URL rewrites.
5. Otherwise, the identifier is invalid and cannot be satisfied. The server
Expand All @@ -106,7 +105,7 @@ For each identifier:
The server should ensure its copy of `caches.json` is no more than 60 days
out-of-date with the canonical linked above.

#### Version negotation
#### Version negotiation

This section uses the ABNF rules of
[RFCF5234](https://tools.ietf.org/html/rfc5234), augmented with the list
Expand Down Expand Up @@ -175,7 +174,7 @@ lower-entropy forms, e.g. by performing the content negotiation (using
hard-coded knowledge about what variants are available at a given URL) and
including only the negotiated media-type, without q-values. The publisher may
also specify
[Variants](https://httpwg.org/http-extensions/draft-ietf-httpbis-variants.html)
[Variants](https://datatracker.ietf.org/doc/draft-ietf-httpbis-variants/00/)
to aid caching proxies that understand that header.

### URL rewrites
Expand All @@ -196,13 +195,13 @@ publisher additional assurance that the JS is not an arbitrary payload. It would
nice to get rid of this dependency; something like [signature-based
SRI](https://github.com/mikewest/signature-based-sri) might be feasible.

## Interaction with content negotation
## Interaction with content negotiation

If the URL serves multiple variants, and is thus subject to [HTTP proactive
negotation](https://tools.ietf.org/html/rfc7231#section-3.4.1), then
negotiation](https://tools.ietf.org/html/rfc7231#section-3.4.1), then
`AMP-Cache-Transform` should only take effect after proactive negotiation has
selected a resource of content type `application/signed-exchange`. In theory,
there may be an interaction with content negotation. For instance, assume the
there may be an interaction with content negotiation. For instance, assume the
request is:

```http
Expand All @@ -220,7 +219,7 @@ to serve SXGs on all variants of an AMP URL.
## Caching proxy behavior

An intermediary proxy may choose to cache these SXG responses and serve them to
future requestors. Strict adherence to
future requesters. Strict adherence to
[Vary](https://tools.ietf.org/html/rfc7234#section-4.1) would mean that, e.g. a
response to a request containing `AMP-Cache-Transform: any` would not match a
response to a request containing `AMP-Cache-Transform: google, any`, since the
Expand Down Expand Up @@ -272,7 +271,7 @@ feel free to get involved.

## Example

A requestor wishing to receive an SXG, without any constraints on its
A requester wishing to receive an SXG, without any constraints on its
subresource URLs, would send:

```http
Expand All @@ -282,7 +281,7 @@ AMP-Cache-Transform: any
The responder may send an SXG with subresource URLs rewritten for a
particular cache or with the original subresource URLs, or a non-SXG response.

A requestor wishing to receive an SXG to be served from and prefetched from the
A requester wishing to receive an SXG to be served from and prefetched from the
Google AMP Cache (e.g. [Googlebot](https://support.google.com/webmasters/answer/182072))
would send:

Expand All @@ -293,7 +292,7 @@ AMP-Cache-Transform: google
The responder must either send an SXG with subresource URLs rewritten for the
Google AMP Cache, or a non-SXG response.

A requestor wishing to receive transformed AMP of a specific version may send a
A requester wishing to receive transformed AMP of a specific version may send a
request like:

```http
Expand Down
2 changes: 1 addition & 1 deletion docs/spec/amp-email-actions-and-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ event.response</pre></td>
</tr>
<tr>
<td><code>changeToLayoutContainer</code></td>
<td>Update's <code>amp-list</code>'s layout to <code>layout="CONTAINTER"</code> to allow <a href="../extensions/amp-list/amp-list.md#dynamic-resizing">dynamic resizing</a>.</td>
<td>Update's <code>amp-list</code>'s layout to <code>layout="CONTAINER"</code> to allow <a href="../../extensions/amp-list/amp-list.md#dynamic-resizing">dynamic resizing</a>.</td>
</tr>
<tr>
<td><code>refresh</code></td>
Expand Down
2 changes: 1 addition & 1 deletion docs/spec/amp-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The following fields are reported:
- `m=string` - the error message
- `a=1` - whether the error is labeled as "user" error (as opposed to a "dev" error).
- `ex=1` - whether the error is labeled as "expected".
- `3p=1` - whether the error occured in the 3p context.
- `3p=1` - whether the error occurred in the 3p context.
- `ca=1` - whether this is a canary version of AMP.
- `or=string` - the ancestor origin if available.
- `iem=1` - whether this document is iframed.
Expand Down
4 changes: 2 additions & 2 deletions docs/spec/amp-html-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ AMP HTML documents MUST
- <a name="canon"></a>contain a `<link rel="canonical" href="$SOME_URL">` tag inside their head that points to the regular HTML version of the AMP HTML document or to itself if no such HTML version exists. [🔗](#canon)
- <a name="chrs"></a>contain a `<meta charset="utf-8">` tag as the first child of their head tag. [🔗](#chrs)
- <a name="vprt"></a>contain a `<meta name="viewport" content="width=device-width">` tag inside their head tag. It's also recommended to include `minimum-scale=1` and `initial-scale=1`. [🔗](#vprt)
- <a name="scrpt"></a>contain a `<script async src="https://cdn.ampproject.org/v0.js"></script>` tag inside their head tag. [🔗](#scrpt)
- <a name="script"></a>contain a `<script async src="https://cdn.ampproject.org/v0.js"></script>` tag inside their head tag. [🔗](#script)
- <a name="boilerplate"></a>contain the [AMP boilerplate code](amp-boilerplate.md) (`head > style[amp-boilerplate]` and `noscript > style[amp-boilerplate]`) in their head tag. [🔗](#boilerplate)

### Metadata
Expand Down Expand Up @@ -564,7 +564,7 @@ Currently, the following SVG elements are allowed:
- [descriptive elements](https://svgwg.org/svg2-draft/struct.html#TermDescriptiveElement): "desc", "metadata", and "title".
- [filter primitive elements](https://drafts.fxtf.org/filter-effects/#filter-primitive): "feColorMatrix", "feComposite", "feGaussianBlur", "feMerge", "feMergeNode", and "feOffset".
- uncategorized elements: "view", and "filter".
- deprecated elements: ["glyph"](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/glyph), ["glyphRef"](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/glyphRef), ["hkern"](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/hkern), ["solidcolor"](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/solidcolor), ["tref"](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/tref), and ["vkern"](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/vkern).
- deprecated elements: ["glyph"](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/glyph), ["glyphRef"](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/glyphRef), ["hkern"](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/hkern), ["tref"](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/tref), and ["vkern"](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/vkern).

As well as these attributes:

Expand Down
4 changes: 2 additions & 2 deletions docs/spec/amp-localstorage.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ The following AMP components and service are using the localStorage.

The localStorage can be used by future AMP components or services with valid reasons to store info client side.

There are a few guidlines to follow due to localStorage implementation in AMP and AMP Viewer.
There are a few guidelines to follow due to localStorage implementation in AMP and AMP Viewer.

### Privacy Policy

Entries can be sent to the AMP Viewer and stored in the top level window. No personal identifiable information would be allowed to comply with our privacy policy. We require that the storage entry to be structured with source code checked into the open source library. Neither the storage key or the value can be calculated externally.

### Storage Policy

All entires will be stored in the top level window domain, which has limited localStorage space. AMP may enforce some size restrictions based on individual usage.
All entries will be stored in the top level window domain, which has limited localStorage space. AMP may enforce some size restrictions based on individual usage.

Please also note that AMP Viewers may have their own size limitation and implementation to expire or clear localStorage entry. The localStorage value will be handled at best effort.

Expand Down
6 changes: 3 additions & 3 deletions docs/spec/amp-shadow-doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ Notice, that XHR and Fetch API are only some of the sources of documents. Other

#### Visibility state (`visibilityState`)

The `options` argument is optional and can provide configuration parameters for AMP document. The most relevant of these options is `visibilityState`. By default it takes the value of "visible", but can be configured to "prerender" mode instead. Prerender mode can be used for minimal prerendering of the element. In this mode most of features are disabled, including analytics and ads. The mode can be later changed to "visibile" via `shadowDoc.setVisibilityState()` function.
The `options` argument is optional and can provide configuration parameters for AMP document. The most relevant of these options is `visibilityState`. By default it takes the value of "visible", but can be configured to "prerender" mode instead. Prerender mode can be used for minimal prerendering of the element. In this mode most of features are disabled, including analytics and ads. The mode can be later changed to "visible" via `shadowDoc.setVisibilityState()` function.

### Shadow-doc API

Both `AMP.attachShadowDoc` and `AMP.attachShadowDocAsStream` return a `ShadowDoc` object that provides numerous ways for interracting with attached AMP documents. This object exposes the following methods and properties:
Both `AMP.attachShadowDoc` and `AMP.attachShadowDocAsStream` return a `ShadowDoc` object that provides numerous ways for interacting with attached AMP documents. This object exposes the following methods and properties:

- `shadowDoc.writer` - the writer that can be used to stream the AMP document. Only available for `attachShadowDocAsStream`.
- `shadowDoc.url` - the URL used in the `attachShadowDoc` or `attachShadowDocAsStream`.
Expand Down Expand Up @@ -127,6 +127,6 @@ We tested with [WebComponents.js polyfill](https://github.com/webcomponents/webc

## Examples and references

See [pwa.js](../examples/pwa/pwa.js) for examples of uses of boths APIs.
See [pwa.js](../../examples/pwa/pwa.js) for examples of uses of both APIs.

See [Combine AMP with PWA](https://amp.dev/documentation/guides-and-tutorials/learn/combine-amp-pwa) and [Embed & use AMP as a data source](https://amp.dev/documentation/guides-and-tutorials/integrate/amp-in-pwa) guides.
2 changes: 1 addition & 1 deletion docs/spec/amp-story-player.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ The data will come from the `<amp-story>`'s metadata attributes in the story's d
- For the string of text: the `entity` attribute (if provided), otherwise the `publisher` attribute.
- When the attribution is clicked, it will navigate the user to a URL. This will come from `entity-url` attribute if provided, otherwise it will use the story's canonical domain.

Read more about these attibutes on the [Metadata Guidelines of `amp-story`.](https://github.com/ampproject/amphtml/blob/main/extensions/amp-story/amp-story.md#metadata-guidelines)
Read more about these attributes on the [Metadata Guidelines of `amp-story`.](https://github.com/ampproject/amphtml/blob/main/extensions/amp-story/amp-story.md#metadata-guidelines)

### JSON Configuration

Expand Down
4 changes: 2 additions & 2 deletions docs/spec/amp-var-substitutions.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ The tables below list the available URL variables grouped by type of usage. Furt
| [Available Screen Width](#available-screen-width) | `AVAILABLE_SCREEN_WIDTH` | `${availableScreenWidth}` |
| [Browser Language](#browser-language) | `BROWSER_LANGUAGE` | `${browserLanguage}` |
| [Screen Color Depth](#screen-color-depth) | `SCREEN_COLOR_DEPTH` | `${screenColorDepth}` |
| [Screen Height](#screen-heigth) | `SCREEN_HEIGHT` | `${screenHeight}` |
| [Screen Height](#screen-height) | `SCREEN_HEIGHT` | `${screenHeight}` |
| [Screen Width](#screen-width) | `SCREEN_WIDTH` | `${screenWidth}` |
| [Scroll Height](#scroll-height) | `SCROLL_HEIGHT` | `${scrollHeight}` |
| [Scroll Width](#scroll-width) | `SCROLL_WIDTH` | `${scrollWidth}` |
Expand Down Expand Up @@ -1220,7 +1220,7 @@ Provides the total time from the time page has become visible to the time a ping

#### Total Visible Time

Provides the total time for which the element has met the `visiblitySpec`conditions at time this ping is sent.
Provides the total time for which the element has met the `visibilitySpec`conditions at time this ping is sent.

- **platform variable**: N/A
- **amp-analytics variable**: `${totalVisibleTime}`
Expand Down
2 changes: 1 addition & 1 deletion docs/spec/email/amp-email-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ An AMP email message MUST
- <a name="ampd"></a>contain a top-level `<html ⚡4email>` tag (`<html amp4email>` is accepted as well). [🔗](#ampd)
- <a name="crps"></a>contain `<head>` and `<body>` tags (They are optional in HTML). [🔗](#crps)
- <a name="chrs"></a>contain a `<meta charset="utf-8">` tag as the first child of their head tag. [🔗](#chrs)
- <a name="scrpt"></a>contain a `<script async src="https://cdn.ampproject.org/v0.js"></script>` tag inside their head tag. [🔗](#scrpt)
- <a name="script"></a>contain a `<script async src="https://cdn.ampproject.org/v0.js"></script>` tag inside their head tag. [🔗](#script)
- <a name="boilerplate"></a>contain amp4email boilerplate (`<style amp4email-boilerplate>body{visibility:hidden}</style>`) inside their head tag to initially hide the content until AMP JS is loaded. [🔗](#boilerplate)

The entire AMPHTML markup must not exceed 200,000 bytes.
Expand Down
Loading

0 comments on commit 034dc49

Please sign in to comment.