Created
May 4, 2019 06:32
-
-
Save zakizaki-ri9/32ea6ea874912b9d45e834d43185d02a to your computer and use it in GitHub Desktop.
GridsomeでOGPを設定する例
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template lang="pug"> | |
layout | |
div | |
p Sample | |
</template> | |
<script> | |
export default { | |
metaInfo: { | |
meta: [ | |
{ | |
property: 'og:site_name', | |
content: 'サイト名' | |
}, | |
{ | |
property: 'og:type', | |
content: 'website' | |
}, | |
{ | |
property: 'og:url', | |
content: 'https://sample.netlify.com' | |
}, | |
{ | |
property: 'og:title', | |
content: 'タイトル名' | |
}, | |
{ | |
property: 'og:description', | |
content: '説明文' | |
}, | |
{ | |
property: 'og:image', | |
content: 'https://sample.netlify.com/sample.jpg' | |
}, | |
{ | |
property: 'fb:app_id', | |
content: 'アプリID' | |
}, | |
{ | |
name: 'twitter:card', | |
content: 'summary_large_image' | |
} | |
] | |
} | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment