Skip to content

Commit

Permalink
Bento docs: split Example and Import via script sections (#36992)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbenz authored Nov 19, 2021
1 parent 69524b0 commit 34ebd94
Show file tree
Hide file tree
Showing 17 changed files with 187 additions and 17 deletions.
12 changes: 11 additions & 1 deletion extensions/amp-accordion/1.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,17 @@ import {defineElement as defineBentoAccordion} from '@bentoproject/accordion';
defineBentoAccordion();
```

### Example: Include via `<script>`
### Include via `<script>`

```html
<script type="module" src="https://cdn.ampproject.org/bento.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/bento.js" crossorigin="anonymous"></script>
<script type="module" src="https://cdn.ampproject.org/v0/bento-accordion-1.0.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/v0/bento-accordion-1.0.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.ampproject.org/v0/bento-accordion-1.0.css" crossorigin="anonymous">
```

### Example

<!--% example %-->

Expand Down
12 changes: 11 additions & 1 deletion extensions/amp-base-carousel/1.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,17 @@ import {defineElement as defineBentoBaseCarousel} from '@bentoproject/base-carou
defineBentoBaseCarousel();
```

### Example: Include via `<script>`
### Include via `<script>`

```html
<script type="module" src="https://cdn.ampproject.org/bento.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/bento.js" crossorigin="anonymous"></script>
<script type="module" src="https://cdn.ampproject.org/v0/bento-base-carousel-1.0.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/v0/bento-base-carousel-1.0.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.ampproject.org/v0/bento-base-carousel-1.0.css" crossorigin="anonymous">
```

### Example

<!--% example %-->

Expand Down
12 changes: 11 additions & 1 deletion extensions/amp-embedly-card/1.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,17 @@ import {defineElement as defineBentoEmbedlyCard} from '@bentoproject/embedly-car
defineBentoEmbedlyCard();
```

### Example: Include via `<script>`
### Include via `<script>`

```html
<script type="module" src="https://cdn.ampproject.org/bento.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/bento.js" crossorigin="anonymous"></script>
<script type="module" src="https://cdn.ampproject.org/v0/bento-embedly-card-1.0.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/v0/bento-embedly-card-1.0.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.ampproject.org/v0/bento-embedly-card-1.0.css" crossorigin="anonymous">
```

### Example

<!--% example %-->

Expand Down
12 changes: 11 additions & 1 deletion extensions/amp-facebook/1.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,17 @@ import {defineElement as defineBentoFacebook} from '@bentoproject/facebook';
defineBentoFacebook();
```

### Example: Include via `<script>`
### Include via `<script>`

```html
<script type="module" src="https://cdn.ampproject.org/bento.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/bento.js" crossorigin="anonymous"></script>
<script type="module" src="https://cdn.ampproject.org/v0/bento-facebook-1.0.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/v0/bento-facebook-1.0.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.ampproject.org/v0/bento-facebook-1.0.css" crossorigin="anonymous">
```

### Example

##### Embed a Facebook Post

Expand Down
12 changes: 11 additions & 1 deletion extensions/amp-fit-text/1.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,17 @@ import {defineElement as defineBentoFitText} from '@bentoproject/fit-text';
defineBentoFitText();
```

### Example: Include via `<script>`
### Include via `<script>`

```html
<script type="module" src="https://cdn.ampproject.org/bento.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/bento.js" crossorigin="anonymous"></script>
<script type="module" src="https://cdn.ampproject.org/v0/bento-fit-text-1.0.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/v0/bento-fit-text-1.0.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.ampproject.org/v0/bento-fit-text-1.0.css" crossorigin="anonymous">
```

### Example

<!--% example %-->

Expand Down
12 changes: 11 additions & 1 deletion extensions/amp-iframe/1.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,17 @@ import {defineElement as defineBentoIframe} from '@bentoproject/iframe';
defineBentoIframe();
```

### Example: Include via `<script>`
### Include via `<script>`

```html
<script type="module" src="https://cdn.ampproject.org/bento.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/bento.js" crossorigin="anonymous"></script>
<script type="module" src="https://cdn.ampproject.org/v0/bento-iframe-1.0.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/v0/bento-iframe-1.0.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.ampproject.org/v0/bento-iframe-1.0.css" crossorigin="anonymous">
```

### Example

<!--% example %-->

Expand Down
12 changes: 11 additions & 1 deletion extensions/amp-inline-gallery/1.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,17 @@ import {defineElement as defineBentoInlineGallery} from '@bentoproject/inline-ga
defineBentoInlineGallery();
```

### Example: Include via `<script>`
### Include via `<script>`

```html
<script type="module" src="https://cdn.ampproject.org/bento.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/bento.js" crossorigin="anonymous"></script>
<script type="module" src="https://cdn.ampproject.org/v0/bento-inline-gallery-1.0.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/v0/bento-inline-gallery-1.0.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.ampproject.org/v0/bento-inline-gallery-1.0.css" crossorigin="anonymous">
```

### Example

<!--% example %-->

Expand Down
12 changes: 11 additions & 1 deletion extensions/amp-instagram/1.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,17 @@ import {defineElement as defineBentoInstagram} from '@bentoproject/instagram';
defineBentoInstagram();
```

### Example: Include via `<script>`
### Include via `<script>`

```html
<script type="module" src="https://cdn.ampproject.org/bento.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/bento.js" crossorigin="anonymous"></script>
<script type="module" src="https://cdn.ampproject.org/v0/bento-instagram-1.0.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/v0/bento-instagram-1.0.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.ampproject.org/v0/bento-instagram-1.0.css" crossorigin="anonymous">
```

### Example

<!--% example %-->

Expand Down
12 changes: 11 additions & 1 deletion extensions/amp-jwplayer/1.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,17 @@ import {defineElement as defineBentoJwplayer} from '@bentoproject/jwplayer';
defineBentoJwplayer();
```

### Example: Include via `<script>`
### Include via `<script>`

```html
<script type="module" src="https://cdn.ampproject.org/bento.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/bento.js" crossorigin="anonymous"></script>
<script type="module" src="https://cdn.ampproject.org/v0/bento-jwplayer-1.0.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/v0/bento-jwplayer-1.0.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.ampproject.org/v0/bento-jwplayer-1.0.css" crossorigin="anonymous">
```

### Example

<!--% example %-->

Expand Down
12 changes: 11 additions & 1 deletion extensions/amp-mathml/1.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,17 @@ import {defineElement as defineBentoMathml} from '@bentoproject/mathml';
defineBentoMathml();
```

### Example: Include via `<script>`
### Include via `<script>`

```html
<script type="module" src="https://cdn.ampproject.org/bento.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/bento.js" crossorigin="anonymous"></script>
<script type="module" src="https://cdn.ampproject.org/v0/bento-mathml-1.0.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/v0/bento-mathml-1.0.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.ampproject.org/v0/bento-mathml-1.0.css" crossorigin="anonymous">
```

### Example

<!--% example %-->

Expand Down
12 changes: 11 additions & 1 deletion extensions/amp-selector/1.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,17 @@ import {defineElement as defineBentoSelector} from '@bentoproject/selector';
defineBentoSelector();
```

### Example: Include via `<script>`
### Include via `<script>`

```html
<script type="module" src="https://cdn.ampproject.org/bento.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/bento.js" crossorigin="anonymous"></script>
<script type="module" src="https://cdn.ampproject.org/v0/bento-selector-1.0.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/v0/bento-selector-1.0.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.ampproject.org/v0/bento-selector-1.0.css" crossorigin="anonymous">
```

### Example

<!--% example %-->

Expand Down
12 changes: 11 additions & 1 deletion extensions/amp-sidebar/1.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,17 @@ import {defineElement as defineBentoSidebar} from '@bentoproject/sidebar';
defineBentoSidebar();
```

### Example: Include via `<script>`
### Include via `<script>`

```html
<script type="module" src="https://cdn.ampproject.org/bento.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/bento.js" crossorigin="anonymous"></script>
<script type="module" src="https://cdn.ampproject.org/v0/bento-sidebar-1.0.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/v0/bento-sidebar-1.0.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.ampproject.org/v0/bento-sidebar-1.0.css" crossorigin="anonymous">
```

### Example

<!--% example %-->

Expand Down
12 changes: 11 additions & 1 deletion extensions/amp-social-share/1.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,17 @@ import {defineElement as defineBentoSocialShare} from '@bentoproject/social-shar
defineBentoSocialShare();
```

### Example: Include via `<script>`
### Include via `<script>`

```html
<script type="module" src="https://cdn.ampproject.org/bento.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/bento.js" crossorigin="anonymous"></script>
<script type="module" src="https://cdn.ampproject.org/v0/bento-social-share-1.0.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/v0/bento-social-share-1.0.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.ampproject.org/v0/bento-social-share-1.0.css" crossorigin="anonymous">
```

### Example

<!--% example %-->

Expand Down
12 changes: 11 additions & 1 deletion extensions/amp-soundcloud/1.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,17 @@ import {defineElement as defineBentoSoundcloud} from '@bentoproject/soundcloud';
defineBentoSoundcloud();
```

### Example: Include via `<script>`
### Include via `<script>`

```html
<script type="module" src="https://cdn.ampproject.org/bento.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/bento.js" crossorigin="anonymous"></script>
<script type="module" src="https://cdn.ampproject.org/v0/bento-soundcloud-1.0.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/v0/bento-soundcloud-1.0.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.ampproject.org/v0/bento-soundcloud-1.0.css" crossorigin="anonymous">
```

### Example

<!--% example %-->

Expand Down
12 changes: 11 additions & 1 deletion extensions/amp-stream-gallery/1.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,17 @@ import {defineElement as defineBentoStreamGallery} from '@bentoproject/stream-ga
defineBentoStreamGallery();
```

### Example: Include via `<script>`
### Include via `<script>`

```html
<script type="module" src="https://cdn.ampproject.org/bento.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/bento.js" crossorigin="anonymous"></script>
<script type="module" src="https://cdn.ampproject.org/v0/bento-stream-gallery-1.0.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/v0/bento-stream-gallery-1.0.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.ampproject.org/v0/bento-stream-gallery-1.0.css" crossorigin="anonymous">
```

### Example

<!--% example %-->

Expand Down
12 changes: 11 additions & 1 deletion extensions/amp-twitter/1.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,17 @@ import {defineElement as defineBentoTwitters} from '@bentoproject/twitter';
defineBentoTwitters();
```

### Example: Include via `<script>`
### Include via `<script>`

```html
<script type="module" src="https://cdn.ampproject.org/bento.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/bento.js" crossorigin="anonymous"></script>
<script type="module" src="https://cdn.ampproject.org/v0/bento-twitter-1.0.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/v0/bento-twitter-1.0.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.ampproject.org/v0/bento-twitter-1.0.css" crossorigin="anonymous">
```

### Example

<!--% example %-->

Expand Down
12 changes: 11 additions & 1 deletion extensions/amp-wordpress-embed/1.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,17 @@ import {defineElement as defineBentoWordpressEmbed} from '@bentoproject/wordpres
defineBentoWordpressEmbed();
```

### Example: Include via `<script>`
### Include via `<script>`

```html
<script type="module" src="https://cdn.ampproject.org/bento.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/bento.js" crossorigin="anonymous"></script>
<script type="module" src="https://cdn.ampproject.org/v0/bento-wordpress-embed-1.0.mjs" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.ampproject.org/v0/bento-wordpress-embed-1.0.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.ampproject.org/v0/bento-wordpress-embed-1.0.css" crossorigin="anonymous">
```

### Example

<!--% example %-->

Expand Down

0 comments on commit 34ebd94

Please sign in to comment.