Skip to content

Commit

Permalink
[docs] Escape inline code block pipes in tables (#10550)
Browse files Browse the repository at this point in the history
* [docs] Escape inline-codeblock pipes in tables

* [docs] Escape all special characters in app auth 39.0.0
  • Loading branch information
byCedric committed Oct 5, 2020
1 parent 0ed719b commit f42437f
Show file tree
Hide file tree
Showing 28 changed files with 593 additions and 561 deletions.
44 changes: 23 additions & 21 deletions docs/pages/guides/progressive-web-apps.md
Expand Up @@ -2,6 +2,8 @@
title: Progressive Web Apps
---

import { InlineCode } from '~/components/base/code';

A progressive web app (or PWA for short) is a website that can be installed on the user's device and used offline. If you build your native app with Expo, then Expo CLI can generate a lot of the PWA automatically based on how the native app works. Ex: icons, splash screens, orientation, etc. Just [enable service workers](https://expo.fyi/enabling-web-service-workers) to get a complete PWA.

You can test your PWA in an Emulator and Simulator by running `expo start:web --ios --android` then installing the PWA via the mobile browser.
Expand All @@ -14,27 +16,27 @@ When you run `expo build:web` the Webpack config reads your `app.config.js` (or

The following properties can be used to customize your PWA:

| `app.config.js` | `manifest.json` | `index.html` |
| ---------------------------------- | ----------------------------- | ------------------------------------------------------- |
| `web.backgroundColor` | `background_color` | |
| `web.description | description` | `description` | `<meta name="description" />` |
| `web.dir` | `dir` | |
| `web.display` | `display` | |
| `web.lang` | `lang` | `<html lang="">` |
| `web.name | name` | `name` | `<title />` |
| `web.orientation | orientation` | `orientation` | |
| `web.scope` | `scope` | |
| `web.shortName | web.name` | `short_name` | `<meta name="apple-mobile-web-app-title"/>` |
| `web.startUrl` | `start_url` | |
| `web.themeColor | primaryColor` | `theme_color` | `<meta name="theme-color" />` |
| `web.crossorigin` | `crossorigin` | |
| `web.relatedApplications` | `related_applications` | |
| `web.preferRelatedApplications` | `prefer_related_applications` | |
| `android.icon | icon` | `icons` | |
| `ios.icon | icon` | | `<link rel="apple-touch-icon" >` |
| `web.favicon | icon` | | `<link rel="shortcut icon" >` |
| `web.barStyle` | | `<meta name="apple-mobile-web-app-status-bar-style" />` |
| `web.splash | ios.splash | splash` | | `<link rel="apple-touch-startup-image" >` |
| `app.config.js` | `manifest.json` | `index.html` |
| ----------------------------------------------------------- | ----------------------------- | ------------------------------------------------------- |
| `web.backgroundColor` | `background_color` | |
| <InlineCode>web.description \| description</InlineCode> | `description` | `<meta name="description" />` |
| `web.dir` | `dir` | |
| `web.display` | `display` | |
| `web.lang` | `lang` | `<html lang="">` |
| <InlineCode>web.name \| name</InlineCode> | `name` | `<title />` |
| <InlineCode>web.orientation \| orientation</InlineCode> | `orientation` | |
| `web.scope` | `scope` | |
| <InlineCode>web.shortName \| web.name</InlineCode> | `short_name` | `<meta name="apple-mobile-web-app-title"/>` |
| `web.startUrl` | `start_url` | |
| <InlineCode>web.themeColor \| primaryColor</InlineCode> | `theme_color` | `<meta name="theme-color" />` |
| `web.crossorigin` | `crossorigin` | |
| `web.relatedApplications` | `related_applications` | |
| `web.preferRelatedApplications` | `prefer_related_applications` | |
| <InlineCode>android.icon \| icon</InlineCode> | `icons` | |
| <InlineCode>ios.icon \| icon</InlineCode> | | `<link rel="apple-touch-icon" >` |
| <InlineCode>web.favicon \| icon</InlineCode> | | `<link rel="shortcut icon" >` |
| `web.barStyle` | | `<meta name="apple-mobile-web-app-status-bar-style" />` |
| <InlineCode>web.splash \| ios.splash \| splash</InlineCode> | | `<link rel="apple-touch-startup-image" >` |

If you need finer control on how the PWA is generated, you should eject the `web/index.html` and add it there.

Expand Down
28 changes: 15 additions & 13 deletions docs/pages/push-notifications/sending-notifications.md
Expand Up @@ -3,6 +3,8 @@ title: Sending Notifications with Expo's Push API
sidebar_title: Sending Notifications with Expo
---

import { InlineCode } from '~/components/base/code';

> If you're just getting started and want to focus on the front-end for now, you can skip this step and just use [Expo's push notification tool](https://expo.io/notifications) to send notifications with the click of a button.
Along with the [`expo-notifications`](../../versions/latest/sdk/notifications/) module, which provides all the client-side functionality for push notifications, Expo can also handle sending these notifications off to APNs and FCM for you! All you need to do is send the request to our servers with the ExpoPushToken you grabbed in the last step.
Expand Down Expand Up @@ -196,19 +198,19 @@ If there's an error with the entire request for either push tickets or push rece

Each message must be a JSON object with the given fields (only the `to` field is required):

| Field | Platform? | Type | Description |
| ------------ | ------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `to` | iOS & Android | `string | string[]` | An Expo push token or an array of Expo push tokens specifying the recipient(s) of this message. |
| `data` | iOS & Android | `Object` | A JSON object delivered to your app. It may be up to about 4KiB; the total notification payload sent to Apple and Google must be at most 4KiB or else you will get a "Message Too Big" error. |
| `title` | iOS & Android | `string` | The title to display in the notification. Often displayed above the notification body |
| `body` | iOS & Android | `string` | The message to display in the notification. |
| `ttl` | iOS & Android | `number` | Time to Live: the number of seconds for which the message may be kept around for redelivery if it hasn't been delivered yet. Defaults to `undefined` in order to use the respective defaults of each provider (0 for iOS/APNs and 2419200 (4 weeks) for Android/FCM). |
| `expiration` | iOS & Android | `number` | Timestamp since the UNIX epoch specifying when the message expires. Same effect as `ttl` (`ttl` takes precedence over `expiration`). |
| `priority` | iOS & Android | `'default' | 'normal' | 'high'` | The delivery priority of the message. Specify "default" or omit this field to use the default priority on each platform ("normal" on Android and "high" on iOS). |
| `subtitle` | iOS Only | `string` | The subtitle to display in the notification below the title. |
| `sound` | iOS Only | `'default' | null` | Play a sound when the recipient receives this notification. Specify `"default"` to play the device's default notification sound, or omit this field to play no sound. |
| `badge` | iOS Only | `number` | Number to display in the badge on the app icon. Specify zero to clear the badge. |
| `channelId` | Android Only | `string` | ID of the Notification Channel through which to display this notification. If an ID is specified but the corresponding channel does not exist on the device (i.e. has not yet been created by your app), the notification will not be displayed to the user. |
| Field | Platform? | Type | Description |
| ------------ | ------------- | -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `to` | iOS & Android | <InlineCode>string \| string[]</InlineCode> | An Expo push token or an array of Expo push tokens specifying the recipient(s) of this message. |
| `data` | iOS & Android | `Object` | A JSON object delivered to your app. It may be up to about 4KiB; the total notification payload sent to Apple and Google must be at most 4KiB or else you will get a "Message Too Big" error. |
| `title` | iOS & Android | `string` | The title to display in the notification. Often displayed above the notification body |
| `body` | iOS & Android | `string` | The message to display in the notification. |
| `ttl` | iOS & Android | `number` | Time to Live: the number of seconds for which the message may be kept around for redelivery if it hasn't been delivered yet. Defaults to `undefined` in order to use the respective defaults of each provider (0 for iOS/APNs and 2419200 (4 weeks) for Android/FCM). |
| `expiration` | iOS & Android | `number` | Timestamp since the UNIX epoch specifying when the message expires. Same effect as `ttl` (`ttl` takes precedence over `expiration`). |
| `priority` | iOS & Android | <InlineCode>'default' \| 'normal' \| 'high'</InlineCode> | The delivery priority of the message. Specify "default" or omit this field to use the default priority on each platform ("normal" on Android and "high" on iOS). |
| `subtitle` | iOS Only | `string` | The subtitle to display in the notification below the title. |
| `sound` | iOS Only | <InlineCode>'default' \| null</InlineCode> | Play a sound when the recipient receives this notification. Specify `"default"` to play the device's default notification sound, or omit this field to play no sound. |
| `badge` | iOS Only | `number` | Number to display in the badge on the app icon. Specify zero to clear the badge. |
| `channelId` | Android Only | `string` | ID of the Notification Channel through which to display this notification. If an ID is specified but the corresponding channel does not exist on the device (i.e. has not yet been created by your app), the notification will not be displayed to the user. |

**Note on `ttl`**: On Android, we make a best effort to deliver messages with zero TTL immediately and do not throttle them. However, setting TTL to a low value (e.g. zero) can prevent normal-priority notifications from ever reaching Android devices that are in doze mode. In order to guarantee that a notification will be delivered, TTL must be long enough for the device to wake from doze mode. This field takes precedence over `expiration` when both are specified.

Expand Down

0 comments on commit f42437f

Please sign in to comment.