From 40eb0e97ec5f466395ea4ffbfb9754005c7c9acd Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Mon, 27 May 2019 17:19:05 +0200 Subject: [PATCH] docs: add amp docs --- docs/_config.yml | 2 ++ docs/package.json | 2 +- docs/source/integrating/amp.md | 47 ++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 docs/source/integrating/amp.md diff --git a/docs/_config.yml b/docs/_config.yml index 569522c96..59704449d 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -120,6 +120,8 @@ sidebar: url: /integrating/translations-i18n/ - title: GDPR Compliance url: /integrating/gdpr/ + - title: Accelerated Mobile Page + url: /integrating/amp/ - title: Product Guide children: - title: How Talk Works diff --git a/docs/package.json b/docs/package.json index 464c246bd..c6fae4104 100644 --- a/docs/package.json +++ b/docs/package.json @@ -3,7 +3,7 @@ "version": "0.0.0", "private": true, "hexo": { - "version": "3.7.1" + "version": "3.8.0" }, "scripts": { "start": "hexo serve", diff --git a/docs/source/integrating/amp.md b/docs/source/integrating/amp.md new file mode 100644 index 000000000..ee5cb6846 --- /dev/null +++ b/docs/source/integrating/amp.md @@ -0,0 +1,47 @@ +--- +title: Accelerated Mobile Page +permalink: /integrating/amp/ +--- + +[AMP](https://amp.dev/) is a light-weight, stripped down HTML page that aims to improve reader experience. _Talk v4.9.0+_ comes with [AMP](https://amp.dev/) support. The current caveat however is that _toast notifications_ are not being rendered when viewing inside AMP. + +# How to integrate +Put the following code into your _AMP_ page and replace `$TALK_URL` and `$ASSET_URL` with the +corresponding values. You can also pass `asset_id` instead of `asset_url`. + +```html +
Read more
+
+``` + +## Single Sign-On +For SSO integration you need to create a page with the following output and replace `$TALK_URL` and `$AUTH_TOKEN` with the appropriate values. Inject your SSO auth scripts to get the `$AUTH_TOKEN` for the current user. Integrating with [amp-access](https://amp.dev/documentation/components/amp-access) is recommended which opens a 1st-party popup to not have browsers block your cookies. This page is then used in `src` of `` above. It must be accessed over `https` and live in a different domain than the `amp` page. + +```html + + + + + + Coral Talk Amp Embed + + +
+ + + + +```