Skip to content

Instantly share code, notes, and snippets.

@zakizaki-ri9
Created May 4, 2019 06:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zakizaki-ri9/32ea6ea874912b9d45e834d43185d02a to your computer and use it in GitHub Desktop.
Save zakizaki-ri9/32ea6ea874912b9d45e834d43185d02a to your computer and use it in GitHub Desktop.
GridsomeでOGPを設定する例
<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