Giter VIP home page Giter VIP logo

vue-seo's Introduction

@Deveodk/vue-toastr

npm vue2

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>

Twitter

# 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>

License

MIT

madewithloveandcofee

vue-seo's People

Contributors

guillaumeleclerc avatar felipegb avatar jasonkellydk avatar seanwash avatar

Watchers

James Cloos avatar Mostafa Kamal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.