refactor: move meta tags into helper module

This commit is contained in:
Sebin Nyshkim 2020-03-22 14:50:37 +01:00
parent 0adf7cb855
commit ca2c9a37a8
2 changed files with 57 additions and 45 deletions

View file

@ -314,51 +314,7 @@ export default {
{ rel: "favicon", href: "/img/sebin-smug-icon.png" },
{ rel: "icon", href: "/img/sebin-smug-icon.png" }
],
meta: [
{ charset: "utf-8" },
{
name: "twitter:card",
content: "summary"
},
{
name: "twitter:creator",
content: "@SebinNyshkim"
},
{
name: "twitter:description",
content:
"Learn everything about your favorite neighborhood derg, down the the minute details!"
},
{
name: "twitter:title",
content: "Sebin Nyshkim - Reference Page"
},
{
name: "twitter:image",
content: "http://ref.sebin-nyshkim.net/img/sebin-smug-icon.png"
},
{
property: "og:title",
content: "Sebin Nyshkim - Reference Page"
},
{
property: "og:type",
content: "website"
},
{
property: "og:url",
content: "http://ref.sebin-nyshkim.net"
},
{
property: "og:image",
content: "http://ref.sebin-nyshkim.net/img/sebin-smug-icon.png"
},
{
property: "og:description",
content:
"Learn everything about your favorite neighborhood derg, down the the minute details!"
}
],
meta: Helper.methods.getMetaTags(),
htmlAttrs: {
lang: "en"
}

View file

@ -42,6 +42,62 @@ export default {
return [warm, cold, workout, lazy];
},
getMetaTags() {
let charset = "utf-8";
let title = "Sebin Nyshkim - Reference Page";
let description =
"Learn everything about your favorite neighborhood derg, down to the minute details!";
let image = "https://ref.sebin-nyshkim.net/img/sebin-smug-icon.png";
let twitterCard = [
{
name: "twitter:card",
content: "summary"
},
{
name: "twitter:creator",
content: "@SebinNyshkim"
},
{
name: "twitter:description",
content: description
},
{
name: "twitter:title",
content: title
},
{
name: "twitter:image",
content: image
}
];
let openGraph = [
{
property: "og:title",
content: title
},
{
property: "og:type",
content: "website"
},
{
property: "og:url",
content: "https://ref.sebin-nyshkim.net"
},
{
property: "og:image",
content: image
},
{
property: "og:description",
content: description
}
];
return [{ charset }, ...twitterCard, ...openGraph];
},
getKittens(count) {
let kittens = [];