Skip to content

yukagil/vue-amp-shadow

Repository files navigation

vue-amp-shadow

Build Status License: MIT

Installation

NPM

Package is installable via NPM

npm install --save vue-amp-shadow

or via Yarn

yarn add vue-amp-shadow

Usage

1. Include Shadow AMP in the <head> of your page

<head>
  ...
  <script async src="https://cdn.ampproject.org/shadow-v0.js"></script>
  ...
</head>

learn more

2. Mount with component

import VueAmpShadow from "vue-amp-shadow";

export default {
  ...
  components: {
    VueAmpShadow
  }
  ...
};
<!--
  Set "src" prop to an AMP document URL.
  If it's on a different domain, it must be CORS enabled.
-->
<vue-amp-shadow src="https://ampbyexample.com"></vue-amp-shadow>

About

A Vue component that takes an AMP document URL as input and renders it.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published