gridsome-plugin-seo

A SEO plugin for Gridsome

Usage no npm install needed!

<script type="module">
  import gridsomePluginSeo from 'https://cdn.skypack.dev/gridsome-plugin-seo';
</script>

README

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.