From 034dc4999581ad721576ee28e4d4bae8377535ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Thu, 9 Nov 2023 04:44:39 +0100 Subject: [PATCH] Fix docs typos (#39604) * Fix docs typos * Fix relative links * Fix links * Fix one more link --- docs/spec/amp-3p-video.md | 2 +- docs/spec/amp-actions-and-events.md | 4 +-- docs/spec/amp-cache-transform.md | 35 +++++++++++------------ docs/spec/amp-email-actions-and-events.md | 2 +- docs/spec/amp-errors.md | 2 +- docs/spec/amp-html-format.md | 4 +-- docs/spec/amp-localstorage.md | 4 +-- docs/spec/amp-shadow-doc.md | 6 ++-- docs/spec/amp-story-player.md | 2 +- docs/spec/amp-var-substitutions.md | 4 +-- docs/spec/email/amp-email-format.md | 2 +- docs/testing.md | 4 +-- docs/web-standards-related-to-amp.md | 2 +- 13 files changed, 36 insertions(+), 37 deletions(-) diff --git a/docs/spec/amp-3p-video.md b/docs/spec/amp-3p-video.md index 0ae6691963c8..f8355733ad64 100644 --- a/docs/spec/amp-3p-video.md +++ b/docs/spec/amp-3p-video.md @@ -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: diff --git a/docs/spec/amp-actions-and-events.md b/docs/spec/amp-actions-and-events.md index 4ac20b98ea81..3fecd6e88e49 100644 --- a/docs/spec/amp-actions-and-events.md +++ b/docs/spec/amp-actions-and-events.md @@ -542,7 +542,7 @@ event.response changeToLayoutContainer - Update's amp-list's layout to layout="CONTAINTER" to allow dynamic resizing. + Update's amp-list's layout to layout="CONTAINER" to allow dynamic resizing. refresh @@ -708,7 +708,7 @@ actions that apply to the whole document. navigateTo(url=STRING, target=STRING, opener=BOOLEAN) -

Navigates current window to given URL, to the optional specified target if given (currenly only supporting _top and _blank ). The optional opener parameter can be specified when using a target of _blank to allow the newly opened page to access window.opener.

+

Navigates current window to given URL, to the optional specified target if given (currently only supporting _top and _blank ). The optional opener parameter can be specified when using a target of _blank to allow the newly opened page to access window.opener.

Caveat: Using normal <a> links is recommended wherever possible since AMP.navigateTo is not recognized by web crawlers.

diff --git a/docs/spec/amp-cache-transform.md b/docs/spec/amp-cache-transform.md index 9c64c4e45ac4..b1c9b5f4b65e 100644 --- a/docs/spec/amp-cache-transform.md +++ b/docs/spec/amp-cache-transform.md @@ -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" @@ -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. @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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: @@ -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 diff --git a/docs/spec/amp-email-actions-and-events.md b/docs/spec/amp-email-actions-and-events.md index 128c1c4b4581..3e92bd680f21 100644 --- a/docs/spec/amp-email-actions-and-events.md +++ b/docs/spec/amp-email-actions-and-events.md @@ -431,7 +431,7 @@ event.response changeToLayoutContainer - Update's amp-list's layout to layout="CONTAINTER" to allow dynamic resizing. + Update's amp-list's layout to layout="CONTAINER" to allow dynamic resizing. refresh diff --git a/docs/spec/amp-errors.md b/docs/spec/amp-errors.md index 44933badc708..31c517e87d11 100644 --- a/docs/spec/amp-errors.md +++ b/docs/spec/amp-errors.md @@ -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. diff --git a/docs/spec/amp-html-format.md b/docs/spec/amp-html-format.md index 67ebb452d3be..6e4778374c70 100644 --- a/docs/spec/amp-html-format.md +++ b/docs/spec/amp-html-format.md @@ -159,7 +159,7 @@ AMP HTML documents MUST - contain a `` 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) - contain a `` tag as the first child of their head tag. [🔗](#chrs) - contain a `` tag inside their head tag. It's also recommended to include `minimum-scale=1` and `initial-scale=1`. [🔗](#vprt) -- contain a `` tag inside their head tag. [🔗](#scrpt) +- contain a `` tag inside their head tag. [🔗](#script) - contain the [AMP boilerplate code](amp-boilerplate.md) (`head > style[amp-boilerplate]` and `noscript > style[amp-boilerplate]`) in their head tag. [🔗](#boilerplate) ### Metadata @@ -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: diff --git a/docs/spec/amp-localstorage.md b/docs/spec/amp-localstorage.md index 82f233cc8653..3b83102c855f 100644 --- a/docs/spec/amp-localstorage.md +++ b/docs/spec/amp-localstorage.md @@ -48,7 +48,7 @@ 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 @@ -56,7 +56,7 @@ Entries can be sent to the AMP Viewer and stored in the top level window. No per ### 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. diff --git a/docs/spec/amp-shadow-doc.md b/docs/spec/amp-shadow-doc.md index ce5a280e2dfb..0efb537d9331 100644 --- a/docs/spec/amp-shadow-doc.md +++ b/docs/spec/amp-shadow-doc.md @@ -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`. @@ -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. diff --git a/docs/spec/amp-story-player.md b/docs/spec/amp-story-player.md index 410f05268d39..0592480c9802 100644 --- a/docs/spec/amp-story-player.md +++ b/docs/spec/amp-story-player.md @@ -119,7 +119,7 @@ The data will come from the ``'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 diff --git a/docs/spec/amp-var-substitutions.md b/docs/spec/amp-var-substitutions.md index 42e84f242ecd..05f0614f7a7c 100644 --- a/docs/spec/amp-var-substitutions.md +++ b/docs/spec/amp-var-substitutions.md @@ -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}` | @@ -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}` diff --git a/docs/spec/email/amp-email-format.md b/docs/spec/email/amp-email-format.md index 075be4d0f786..c1938f65478a 100644 --- a/docs/spec/email/amp-email-format.md +++ b/docs/spec/email/amp-email-format.md @@ -32,7 +32,7 @@ An AMP email message MUST - contain a top-level `` tag (`` is accepted as well). [🔗](#ampd) - contain `` and `` tags (They are optional in HTML). [🔗](#crps) - contain a `` tag as the first child of their head tag. [🔗](#chrs) -- contain a `` tag inside their head tag. [🔗](#scrpt) +- contain a `` tag inside their head tag. [🔗](#script) - contain amp4email boilerplate (``) 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. diff --git a/docs/testing.md b/docs/testing.md index f4ee6bc41e0a..0cef52308f81 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -369,13 +369,13 @@ firebase deploy If you are only testing a single file, you can use `amp firebase --file=path/to/my/file.amp.html` to avoid copying over all of `test/manual` and `examples`. It will copy over the specified file to `firebase/index.html`, which simplifies debugging. -After deploying, you can access your project publically at its hosting URL `https://your-project-name.firebaseapp.com`. +After deploying, you can access your project publicly at its hosting URL `https://your-project-name.firebaseapp.com`. Additionally, you can create multiple projects and switch between them in the CLI using `firebase use your-project-name`. #### Testing Ads -Testing ads in deployed demos requires allowlisting of 3p urls. You can do this by adding your intended deployment hostname as an environemnt variable `AMP_TESTING_HOST` and using the `fortesting` flag. For example: +Testing ads in deployed demos requires allowlisting of 3p urls. You can do this by adding your intended deployment hostname as an environment variable `AMP_TESTING_HOST` and using the `fortesting` flag. For example: ```sh export AMP_TESTING_HOST="my-project.firebaseapp.com" diff --git a/docs/web-standards-related-to-amp.md b/docs/web-standards-related-to-amp.md index b3be001b8a20..021c3dc766c3 100644 --- a/docs/web-standards-related-to-amp.md +++ b/docs/web-standards-related-to-amp.md @@ -4,7 +4,7 @@ Date: 2018-08-26 | Standard/feature | Relation | Status | | ------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------: | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | -| [Web Packaging](https://github.com/WICG/webpackage) | Privacy-preserving preloading from cache under publisher URL | Initial version of spec final. [Shipping in Chrome M73](https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/gPH_BcOBEtc/Z41GR0mwEQAJ), IETF concensus seeking in progress | +| [Web Packaging](https://github.com/WICG/webpackage) | Privacy-preserving preloading from cache under publisher URL | Initial version of spec final. [Shipping in Chrome M73](https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/gPH_BcOBEtc/Z41GR0mwEQAJ), IETF consensus seeking in progress | | [Portals](https://github.com/WICG/portals/blob/main/README.md) | AMP Carousel like UI with navigation to publisher (alternative to iframe promotion) | Iterating on spec. Prototype implementation in Chromium | | [Performance Timeline](https://w3c.github.io/performance-timeline/) | Real world metric collection. This is the framework. New metrics may be needed. | Shipping in first browsers | | [Paint Timing 1](https://w3c.github.io/paint-timing/) | Initial paint related metrics (performance assessment | Shipping in first browsers |