Skip to content

Commit

Permalink
amp.dev automatic content update (#6828)
Browse files Browse the repository at this point in the history
  • Loading branch information
powerivq authored Jul 23, 2024
1 parent 97598e8 commit 4234749
Show file tree
Hide file tree
Showing 9 changed files with 139 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,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="https://github.com/ampproject/amphtml/blob/master/docs/spec/../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="https://github.com/ampproject/amphtml/blob/master/docs/spec/../../extensions/amp-list/amp-list.md#dynamic-resizing">dynamic resizing</a>.</td>
</tr>
<tr>
<td><code>refresh</code></td>
Expand Down Expand Up @@ -726,7 +726,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
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,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="https://github.com/ampproject/amphtml/blob/master/docs/spec/../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="https://github.com/ampproject/amphtml/blob/master/docs/spec/../../extensions/amp-list/amp-list.md#dynamic-resizing">dynamic resizing</a>.</td>
</tr>
<tr>
<td><code>refresh</code></td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,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
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
$title: Structure and rendering of AMP emails
order: 2
formats:
- email
teaser:
text: >-
Email is structured as a MIME tree. This MIME tree contains the message body
and any attachments to the email.
toc: true
---

<!--
This file is imported from https://github.com/ampproject/amphtml/blob/master/docs/spec/email/amp-email-structure.md.
Please do not change this file.
If you have found a bug or an issue please
have a look and request a pull request there.
-->



Email is structured as a [MIME tree](https://en.wikipedia.org/wiki/MIME). This MIME tree contains the message body and any attachments to the email.

To embed AMP within an email, add a new MIME part with a content type of `text/x-amp-html` as a descendant of `multipart/alternative`. It should live alongside the existing `text/html` or `text/plain` parts. This ensures that the email message works on all clients.

<amp-img alt="AMP for Email MIME Parts Diagram"
layout="responsive"
width="752" height="246"
src="https://github.com/ampproject/amphtml/raw/main/docs/spec/img/amp-email-mime-parts.png">
<noscript>
<img alt="AMP for Email MIME Parts Diagram" src="../img/amp-email-mime-parts.png" />
</noscript>
</amp-img>

For more information about the `multipart/alternative` subtype, refer to [RFC 1521, section 7.2.3](https://tools.ietf.org/html/rfc1521#section-7.2.3).

## Additional information <a name="additional-information"></a>

The `text/x-amp-html` part must be nested under a `multipart/alternative` node.
An email cannot have more than one `text/x-amp-html` part inside a `multipart/alternative` node.

The `multipart/alternative` must contain at least one non-AMP (`text/plain` or `text/html`) node in addition to the
`text/x-amp-html` node. This will be displayed to users whose email clients don't support AMP or who opted out via
their email provider's settings.

Note: Some email clients[[1]](https://openradar.appspot.com/radar?id=6054696888303616) will only render the last MIME part,
so we recommend placing the `text/x-amp-html` MIME part _before_ the `text/html` MIME part.

### Replying/forwarding semantics <a name="replyingforwarding-semantics"></a>

The email client strips out the `text/x-amp-html` part of the MIME tree when a user replies to or forwards an AMP email message.

### Expiry <a name="expiry"></a>

The email client may stop displaying the AMP part of an email after a set period of time, e.g. 30 days. In this
case, emails will display the `text/html` or `text/plain` part.

## Example <a name="example"></a>

<!-- prettier-ignore-start -->
[sourcecode:html]
From: Person A <persona@example.com>
To: Person B <personb@example.com>
Subject: An AMP email!
Content-Type: multipart/alternative; boundary="001a114634ac3555ae05525685ae"

--001a114634ac3555ae05525685ae
Content-Type: text/plain; charset="UTF-8"; format=flowed; delsp=yes

Hello World in plain text!

--001a114634ac3555ae05525685ae
Content-Type: text/x-amp-html; charset="UTF-8"

<!doctype html>
<html ⚡4email>
<head>
<meta charset="utf-8">
<style amp4email-boilerplate>body{visibility:hidden}</style>
<script async src="https://cdn.ampproject.org/v0.js"></script>
</head>
<body>
Hello World in AMP!
</body>
</html>
--001a114634ac3555ae05525685ae
Content-Type: text/html; charset="UTF-8"

<span>Hello World in HTML!</span>
--001a114634ac3555ae05525685ae--
[/sourcecode]
<!-- prettier-ignore-end -->
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ these players implement.
- [amp-nexxtv-player](https://amp.dev/documentation/components/amp-nexxtv-player)
- [amp-ooyala-player](https://amp.dev/documentation/components/amp-ooyala-player)
- [amp-powr-player](https://amp.dev/documentation/components/amp-powr-player)
- [amp-redbull-player](https://amp.dev/documentation/components/amp-redbull-player)
- [amp-vimeo](https://amp.dev/documentation/components/amp-vimeo)
- [amp-viqeo-player](https://amp.dev/documentation/components/amp-viqeo-player)
- [amp-wistia-player](https://amp.dev/documentation/components/amp-wistia-player)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,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](https://github.com/ampproject/amphtml/blob/master/docs/spec/amp-boilerplate.md) (`head > style[amp-boilerplate]` and `noscript > style[amp-boilerplate]`) in their head tag. [🔗](#boilerplate)

### Metadata <a name="metadata"></a>
Expand Down Expand Up @@ -583,7 +583,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
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Adds support for AppsFlyer. More details for adding AppsFlyer support can be fou

Type attribute value: `atinternet`

Adds support for AT Internet. More details for adding AT Internet support can be found at [developers.atinternet-solutions.com](http://developers.atinternet-solutions.com/javascript-en/advanced-features-javascript-en/accelerated-mobile-pages-amp-javascript-en/).
Adds support for AT Internet. More details for adding AT Internet support can be found at [developers.atinternet-solutions.com](https://developers.atinternet-solutions.com/as2-tagging-en/javascript-en/advanced-features-javascript-en/accelerated-mobile-pages-amp-javascript-en/index.html).

### Baidu Analytics <a name="baidu-analytics"></a>

Expand Down Expand Up @@ -204,7 +204,6 @@ Adds support for Dynatrace real user monitoring. Requires defining _var_ `app` w
Type attribute value: `epica`

Adds support for EPICA page views and events.
More details can be found at [EPICA docs](https://www.epica.ai).

### Eulerian Analytics <a name="eulerian-analytics"></a>

Expand Down Expand Up @@ -257,7 +256,7 @@ Unlike other analytics vendors, Google Tag Manager is a tag management service,

Type attribute value: `ibeatanalytics`

Adds support for Ibeat Analytics. More details for adding Ibeat support can be found at [Ibeat Integration Support](https://ibeat.indiatimes.com/support.html#h.a5rit14mwie1).
Adds support for Ibeat Analytics.

<!-- markdown-link-check-disable -->

Expand Down Expand Up @@ -347,13 +346,13 @@ Adds support for Krux. Configuration details can be found at [help.krux.com](htt

Type attribute value: `linkpulse`

Adds support for Linkpulse. Configuration details can be found at [docs.linkpulse.com](http://docs.linkpulse.com).
Adds support for Linkpulse. Configuration details can be found at [docs.linkpulse.com](https://www.kilkaya.com/).

### Lotame <a name="lotame"></a>

Type attribute value: `lotame`

Adds support for Lotame. More information and configuration details can be found at [my.lotame.com](https://my.lotame.com/t/83h37h9/overview-1st-party-data-collection-in-google-amp).
Adds support for Lotame. More information and configuration details can be found at [my.lotame.com](https://my.lotame.com/).

### Mapp Intelligence <a name="mapp-intelligence"></a>

Expand Down Expand Up @@ -427,6 +426,12 @@ Adds support for [SOASTA mPulse](https://www.soasta.com/mPulse). Configuration d

Type attribute value: `navegg`

### Neodata <a name="neodata"></a>

Type attribute value: `neodata`

Adds support for Neodata Audience Platform. Please contact our support team to get set up with your `sysId`, `tagId` and `advId` parameters in the `vars` section.

### New Relic <a name="new-relic"></a>

Type attribute value: `newrelic`
Expand All @@ -443,7 +448,7 @@ Adds support for Nielsen DCR. Please contact your Nielsen representative to get

Type attribute value: `nielsen-marketing-cloud`

Adds support for Nielsen Marketing Cloud. More details can be found at [Nielsen Marketing Cloud](http://www.nielsen.com/us/en/solutions/capabilities/nielsen-marketing-cloud.html).
Adds support for Nielsen Marketing Cloud. More details can be found at [Nielsen Marketing Cloud](https://www.nielsen.com/solutions/media-planning/marketing-cloud/).

### OEWA <a name="oewa"></a>

Expand Down Expand Up @@ -580,13 +585,13 @@ Find out more on the implementation check our documentation at [docs.rudderstack
Type attribute value: `segment`

Adds support for segment page views and events.
To see the full list of fields that you can send, see [Segment Spec](https://segment.com/docs/spec/).
To see the full list of fields that you can send, see [Segment Spec](https://segment.com/docs/connections/spec/).

### SensorsData <a name="sensorsdata"></a>

Type attribute value: `sensorsanalytics`

Adds support for Sensors Data. More details for adding Sensors Data support can be found at [sensorsdata.com](https://manual.sensorsdata.cn/sa/latest/web-js-sdk-7548149.html).
Adds support for Sensors Data. More details for adding Sensors Data support can be found at [sensorsdata.com](https://manual.sensorsdata.cn/).

### ShinyStat <a name="shinystat"></a>

Expand Down Expand Up @@ -650,6 +655,10 @@ Type attribute value: `treasuredata`

Adds support for Treasure Data. Configuration details can be found at [docs.treasuredata.com](https://docs.treasuredata.com/display/public/INT/Google+Accelerated+Mobile+Pages+AMP).

### Triboo Data Analytics <a name="triboo-data-analytics"></a>

Type attribute value: `tribooanalytics`

### Umeng+ Analytics <a name="umeng-analytics"></a>

Type attribute value: `umenganalytics`
Expand Down
Loading

0 comments on commit 4234749

Please sign in to comment.