@deveodk/vue-seo
v1.0.1
Published
Easy way to add seo to any vue based page, works without use of jquery. Based on the original idea by GuillaumeLeclerc/vue-seo
Downloads
38
Maintainers
Readme
@Deveodk/vue-toastr
Easy way to add seo to any vue based page, works without use of jquery. Based on the original idea by GuillaumeLeclerc/vue-seo
Demo
See a functioning demo deveo demo site
Installation
npm install --save @deveodk/vue-seo
Usage
Bundler (Webpack, Rollup)
import Vue from 'vue'
import vueSeo from '@deveodk/vue-seo'
Vue.use(vueSeo)
Browser
<!-- From CDN -->
<script src="https://unpkg.com/@deveodk/vue-seo"></script>
Important disclaimer
Due to the fact that facebook and twitter wont execute javascript when crawling. The plugin will not work unless you use some sort of server side rendering. Google however defaults to some of facebooks open graph tags.
Usage
The api is very similar to the original vue-seo. Every content property is reactive
Basic
# Set the title
<seo-title content="title here"></seo-title>
# Set the description
<seo-description content="description here"></seo-description>
# Set the author
<seo-author content="author link here"></seo-author>
# Set the keywords
<seo-keywords content="keywords list here"></seo-keywords>
# set the canoncial link
<seo-canonical content="canoncial link here"></seo-canonical>
Open Graph (facebook)
# Set the title
<seo-og-title content="title here"></seo-og-title>
# Set the description
<seo-og-description content="description here"></seo-og-description>
# Set the site name
<seo-og-site-name content="site name here"></seo-og-site-name>
# Set the image
<seo-og-image content="image link here"></seo-og-image>
# set the see also
<seo-og-see-also content="see also link here"></seo-og-see-also>
# set the url
<seo-og-url content="set the url"></seo-og-url>
Google+
# Set the name
<seo-google-name content="name here"></seo-google-name>
# Set the description
<seo-google-description content="description here"></seo-google-description>
# Set the image
<seo-google-image content="image link here"></seo-google-image>
# Set the title
<seo-twitter-title content="title here"></seo-twitter-title>
# Set the description
<seo-twitter-description content="description here"></seo-twitter-description>
# Set the image
<seo-twitter-image content="image link here"></seo-twitter-image>
# Set the card
<seo-twitter-card content="card description here"></seo-twitter-card>
# Set the url
<seo-twitter-url content="url here"></seo-twitter-url>
# Set the image
<seo-twitter-image content="image link here"></seo-twitter-image>
Custom properties
This provides an easy way to set html tags, there is not included in the standard package
# Set a custom propery
<seo-custom tag="meta" :attrName="'name'" :attrValue="'author'" contentName="'content'" content="image link here"></seo-twitter-image>