Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📖 Add / fix language identifiers in .md files across amphtml #25254

Merged
merged 1 commit into from
Oct 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions ads/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,8 @@ Please verify your ad is fully functioning, for example, by clicking on an ad. W

Please make sure your changes pass the tests:

```
```sh
gulp unit --watch --nobuild --files=test/unit/{test-ads-config.js,test-integration.js}

```

If you have non-trivial logic in `/ads/yournetwork.js`, adding a unit test at `/test/unit/ads/test-yournetwork.js` is highly recommended.
Expand Down
2 changes: 1 addition & 1 deletion ads/custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ If no slot was specified, the server returns a single template rather than an ar
The ad server must enforce [AMP CORS](https://github.com/ampproject/amphtml/blob/master/spec/amp-cors-requests.md#cors-security-in-amp).
Here is an example set of the relevant response headers:

```
```html
Access-Control-Allow-Origin:https://my--ad--server-com.cdn.ampproject.org
```

Expand Down
31 changes: 18 additions & 13 deletions ads/ix.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,31 @@ Each [amp-ad](https://amp.dev/documentation/components/amp-ad/) element that us

### Example: RTC Specification on an amp-ad

```
```html
<!-- Note: Default timeout is 1000ms -->
<amp-ad width="320" height="50" type="doubleclick"
        data-slot="/1234/pos"
        rtc-config='{
            "vendors": {
                "IndexExchange": {"SITE_ID": "123456"},
            },
            "timeoutMillis": 1000}'>
<amp-ad
width="320"
height="50"
type="doubleclick"
data-slot="/1234/pos"
rtc-config='{
"vendors": {
"IndexExchange": {"SITE_ID": "123456"}
},
"timeoutMillis": 1000
}'
>
</amp-ad>
```

The value of `rtc-config` must conform to the following specification:

```
```json
{
            "vendors": {
                "IndexExchange": {"SITE_ID": "123456"},
            },
            "timeoutMillis": 1000
"vendors": {
"IndexExchange": {"SITE_ID": "123456"}
},
"timeoutMillis": 1000
}
```

Expand Down
1 change: 0 additions & 1 deletion ads/navegg.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ To get Navegg integration working you only need to specify the `rtc-config` para
data-slot="/4119129/mobile_ad_banner"
rtc-config="{"vendors": {"navegg": {"NVG_ACC": "NAVEGG_ACCOUNT_ID"}}}">
</amp-ad>

```

### Configuration
Expand Down
22 changes: 9 additions & 13 deletions contributing/TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ You can also run the visual tests locally during development. You must first cre

First, build the AMP runtime and run the gulp task that invokes the visual diff script:

```
```sh
gulp build
gulp visual-diff --nobuild
```
Expand All @@ -283,13 +283,13 @@ The build will use the Percy credentials set via environment variables in the pr

To see debugging info during Percy runs, you can run:

```
```sh
gulp visual-diff --chrome_debug --webserver_debug
```

The debug flags `--chrome_debug` and `--webserver_debug` can be used independently. To enable both debug flags, you can also run:

```
```sh
gulp visual-diff --debug
```

Expand All @@ -303,7 +303,7 @@ After each run, a new set of results will be available at `https://percy.io/<org

It's much faster to debug with local build (`gulp` + `http://localhost:8000/`). In Chrome you can use [DevTools port forwarding](https://developers.google.com/web/tools/chrome-devtools/remote-debugging/local-server). However, iOS Safari does not give a similar option. Instead, you can use [ngrok](https://ngrok.com/). Just [download](https://ngrok.com/download) the ngrok binary for your platform and run it like this:

```
```sh
ngrok http 8000
```

Expand All @@ -313,7 +313,7 @@ Once started, the ngrok will print URLs for both `http` and `https`. E.g. `http:

For deploying and testing local AMP builds on [Firebase](https://firebase.google.com/), install firebase and initialize firebase within this directory\* (a `firebase` folder can be generated with the command, `gulp firebase`).

```
```sh
npm install -g firebase-tools
firebase login
firebase init
Expand All @@ -331,15 +331,11 @@ firebase deploy

`gulp firebase` will generate a `firebase` folder and copy over all files from `dist`, `examples` and `test/manual`. It will rewrite all urls in the copied files to point to the local versions of AMP (i.e. the ones copied from `dist` to `firebase/dist`). When you initialize firebase, you should set the `firebase` `public` directory to `firebase`. This way `firebase deploy` will just directly copy and deploy the contents of the generated `firebase` folder. As an example, your `firebase.json` file can look something like this:

```
```json
{
"hosting": {
"public": "firebase",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
}
}
```
Expand All @@ -354,7 +350,7 @@ Additionally, you can create multiple projects and switch between them in the CL

Testing ads in deployed demos requires whitelisting 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:

```
```sh
export AMP_TESTING_HOST="my-project.firebaseapp.com"
gulp firebase --fortesting
firebase deploy
Expand All @@ -368,7 +364,7 @@ You can run and create E2E tests locally during development. Currently tests onl

Run all tests with:

```
```sh
gulp e2e
```

Expand Down
5 changes: 2 additions & 3 deletions contributing/building-an-amp-extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ extension. For example, video players are also suffixed with `-player`
You create your extension's files inside the `extensions/` directory.
The directory structure is below:

```text
```sh
/extensions/amp-my-element/
├── 0.1/
| ├── test/
Expand All @@ -57,8 +57,7 @@ The directory structure is below:
├── validator-amp-my-element.protoascii # Validator rules (req'd)
├── amp-my-element.md # Element's main documentation (req'd)
└── More documentation in .md files (optional)
└── OWNERS # Owners file. Primary contact(s) for the extension. More about owners [here](https://github.com/ampproject/amphtml/blob/master/contributing/CODE_OWNERSHIP.md) (req'd)

└── OWNERS # Owners file. Primary contact(s) for the extension. (req'd)
```

In most cases you'll only create the required (req'd) files. If your element does not need custom CSS, you don't need to create the CSS file.
Expand Down
Loading