Skip to content
This repository was archived by the owner on Mar 31, 2021. It is now read-only.

Quickly and easily add common OGP tags for Google, Facebook, and Twitter.

Notifications You must be signed in to change notification settings

brandonpittman/gridsome-plugin-ogp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gridsome-plugin-ogp

Adding OGP meta tags to every page can be a pain. This plugin aims to alleviate that pain. Add the plugin to your project like so.

npm i gridsome-plugin-ogp

In gridsome.config.js...

plugins: [
  {
    use: 'gridsome-plugin-ogp'
  }
]

Then, in any page or template component you have, adjust the metaInfo hook like so.

metaInfo() {
  return {
    ...this.$ogp({
      title: 'your-title',
      description: 'your-description',
      image: 'your-image-url'
      appId: 'someFacebookAppID' // Facebook-only
    })
  }
}

This will then populate the meta tags needed for Facebook, Google, and Twitter. It will also set the standard page title and description at the same time.

About

Quickly and easily add common OGP tags for Google, Facebook, and Twitter.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors