Skip to content

Commit

Permalink
add meta tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Amorpheuz committed Jun 6, 2021
1 parent 46f78e3 commit ead2114
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 6 deletions.
10 changes: 4 additions & 6 deletions nuxt.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import metaTags from './utility/metaTags'

export default {
ssr: true,
target: 'server',
head: {
title: 'fetch-cat-breeds',
title: 'Fur~miliar',
htmlAttrs: {
lang: 'en',
},
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: '' },
],
meta: [...metaTags],
link: [
{ rel: 'icon', type: 'image/svg+xml', href: '/furmiliar-favicon.svg' },
{
Expand Down
Binary file added static/furmiliar-banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions utility/metaTags.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
const base = [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ name: 'title', content: 'Fur~miliar' },
{
hid: 'description',
name: 'description',
content:
'Fur~miliar allows you to search and learn more about various cat breeds!',
},
]

const openGraph = [
{ property: 'og:type', content: 'website' },
{ property: 'og:url', content: 'https://furmiliar.amorpheuz.dev/' },
{ property: 'og:title', content: 'Fur~miliar' },
{
property: 'og:description',
content:
'Fur~miliar allows you to search and learn more about various cat breeds.',
},
{
property: 'og:image',
content: 'https://furmiliar.amorpheuz.dev/furmiliar-banner.png',
},
]

const twitter = [
{ property: 'twitter:card', content: 'summary_large_image' },
{ property: 'twitter:url', content: 'https://furmiliar.amorpheuz.dev/' },
{ property: 'twitter:title', content: 'Fur~miliar' },
{
property: 'twitter:description',
content:
'Fur~miliar allows you to search and learn more about various cat breeds.',
},
{
property: 'twitter:image',
content: 'https://furmiliar.amorpheuz.dev/furmiliar-banner.png',
},
]

const metaTags = [...base, ...openGraph, ...twitter]

export default metaTags

0 comments on commit ead2114

Please sign in to comment.