diff options
Diffstat (limited to 'utils/getSiteMeta.js')
| -rw-r--r-- | utils/getSiteMeta.js | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/utils/getSiteMeta.js b/utils/getSiteMeta.js new file mode 100644 index 0000000..51266e9 --- /dev/null +++ b/utils/getSiteMeta.js @@ -0,0 +1,60 @@ +const type = 'website' +const url = 'https://yucky.fun' +const title = 'yucky! aiming' +const description = '' +const mainImage = '/static/favicon.jpg' + +export default (meta) => { + return [ + { + hid: 'description', + name: 'description', + content: (meta && meta.description) || description + }, + { + hid: 'og:type', + property: 'og:type', + content: (meta && meta.type) || type + }, + { + hid: 'og:url', + property: 'og:url', + content: (meta && meta.url) || url + }, + /* { + hid: 'og:title', + property: 'og:title', + content: (meta && meta.title) || title + }, */ + { + hid: 'og:description', + property: 'og:description', + content: (meta && meta.description) || description + }, + { + hid: 'og:image', + property: 'og:image', + content: (meta && meta.mainImage) || mainImage + }, + { + hid: 'twitter:url', + name: 'twitter:url', + content: (meta && meta.url) || url + }, + { + hid: 'twitter:title', + name: 'twitter:title', + content: (meta && meta.title) || title + }, + { + hid: 'twitter:description', + name: 'twitter:description', + content: (meta && meta.description) || description + }, + { + hid: 'twitter:image', + name: 'twitter:image', + content: (meta && meta.mainImage) || mainImage + } + ] +} |