VuePress v2 plugin for generating open graph meta tags to improve SEO.
npm install --save vuepress-plugin-open-graph
Add plugin to your VuePress config:
import { openGraphPlugin } from 'vuepress-plugin-open-graph'
export default {
plugins: [
openGraphPlugin({
/* options */
}),
],
}
That's all. Just use frontmatter options in your Markdown files:
---
title: Post title
description: Post description
date: Post publish date
image: URL to post preview
---
-
Type:
string
-
Required:
true
-
Details:
The domain name where the current site is deployed, the plugin needs this option to work.
-
Type:
string
-
Required:
false
-
Details:
Link to default open graph image. This image will be used unless otherwise specified.
-
Type:
'summary' | 'summary_large_image'
-
Required:
false
-
Details:
Twitter card type for a beautiful visual display of the tweet with post link. Read more.
-
Type:
string
-
Required:
false
-
Details:
Twitter username of your website.
Pull requests are welcome.