Simple Seo plugin for Vuepress 1.x
yarn add -D @limdongjin/vuepress-plugin-simple-seo
module.exports = {
plugins: ['@limdongjin/vuepress-plugin-simple-seo', {
// write options. ( all options are optional )
}]
}
// config.js
module.exports = {
plugins: ['@limdongjin/vuepress-plugin-simple-seo', {
default_image: '/images/main-image-min.jpg',
root_url: 'https://limdongjin.github.io',
default_site_name: 'limdongjin TIL'
}]
}
---
description: It is Simple Seo Plugin for Vuepress
image: '/post-specific-image.png'
twitter_creator: twituser
twitter_site: twituser
---
# It is automatic title.
hello world
## gogo
<!-- result html head tags-->
<meta property="og:image" content="https://limdongjin.github.io/images/main-image-min.jpg">
<meta name="twitter:image" content="https://limdongjin.github.io/images/main-image-min.jpg">
<meta property="og:description" content="It is Simple Seo Plugin for Vuepress">
<meta name="twitter:description" content="It is Simple Seo Plugin for Vuepress">
<meta itemprop="description" content="It is Simple Seo Plugin for Vuepress">
<meta property="og:url" content="https://limdongjin.github.io/">
<meta name="twitter:url" content="https://limdongjin.github.io/">
<meta property="og:title" content="It is automatic title">
<meta name="twitter:title" content="It is automatic title">
<meta itemprop="name" content="It is automatic title">
<meta property="og:type" content="article"> <!-- default value -->
<meta name="twitter:card" content="summary"> <!-- default value -->
<meta property="og:site_name" content="limdongjin TIL">
<meta name="twitter:site" content="@twituser">
<meta name="twitter:creator" content="@twituser">
- recommend option are also "optional" option.
- Type:
string
- Default: Empty String
- Example:
https://limdongjin.github.io
<meta property="og:url" content="https://limdongjin.github.io/">
<meta name="twitter:url" content="https://limdongjin.github.io/">
- Default:
undefined
<meta property="og:site_name" content="limdongjin TIL">
- Default:
undefined
- Example,
/image.png
<meta name="og:image" content="https://mysite.com/image.png">
<meta name="twitter:image" content="https://mysite.com/image.png">
<meta itemprop="image" content="https://mysite.com/image.png">
- Default:
undefined
<meta name="og:image:type" content="image/jpeg">
- Default:
undefined
<meta name="og:image:width" content="400">
- Default:
undefined
<meta name="og:image:height" content="500">
- Default:
undefined
<meta name="og:image:alt" content="it is alt!">
- Default:
undefined
<meta name="twitter:creator" content="@limdongjin">
- Default:
undefined
<meta name="twitter:site" content="@limdongjin">
- Default:
summary
<meta name="twitter:card" content="summary">
- Default:
article
<meta property="og:type" content="website">
- each page can override default option values.
- if you want minimal setting, recommend just set description, or image.
if you are not write frontmatter title, create meta title tag from $page.title.
<meta property="og:title" content="awesome title">
<meta name="twitter:title" content="Dongjin Lim, 초고수 소프트웨어 엔지니어를 향하여">
<meta property="og:description" content="write your page description">
<meta name="twitter:description" content="write your page description">
<meta name="description" content="write your page description">
<meta itemprop="description" content="write your page description">
<meta name="og:image" content="https://mysite.com/image.png">
<meta name="twitter:image" content="https://mysite.com/image.png">
<meta itemprop="image" content="https://mysite.com/image.png">
<meta name="og:image:type" content="image/jpeg">
<meta name="og:image:width" content="400">
<meta name="og:image:height" content="500">
<meta name="og:image:alt" content="it is alt!">
- Example: twituser
<meta name="twitter:creator" content="@twituser">
- Example: twituser
<meta name="twitter:site" content="@twituser">
<meta name="twitter:card" content="summary">
<meta property="og:type" content="website">
<meta property="og:site_name" content="limdongjin TIL">
MIT © limdongjin