1.0.2 • Published 3 years ago

gridsome-plugin-seo v1.0.2

Weekly downloads
71
License
MIT
Repository
github
Last release
3 years ago

Gridsome SEO plugin

Simplify the addition of meta tags helpful for SEO such as keywords, description and rich media formats like open graph and twitter cards.

This plugin is just wrapping the functionality of the Nuxt-SEO plugin.

Install

  • npm i gridsome-plugin-seo --save
  • yarn add gridsome-plugin-seo

Usage

gridsome.config.js

module.exports = {
  plugins: [{
    use: 'gridsome-plugin-seo'
  }]
}

Index.vue or other pages and templates

<script>
export default {
  metaInfo () {
    return this.$seo({
      title: 'My page', // Uses the titleTemplate in Gridsome config
      description: 'My description',
      keywords: 'one,two',
      openGraph: {
        title: 'My site',
        type: 'website'
      },
      twitter: {
        title: 'My site',
        type: 'summary'
      },
      link: [],   // any links
      script: []  // any scripts
    })
  }
}
</script>

Options

All available options in Nuxt-SEO docs are supported.

See the available schema.