Add metadata

This commit is contained in:
samaradel
2021-04-19 14:03:09 +02:00
parent 2430ceb0a4
commit 70050dbcac
11 changed files with 352 additions and 15 deletions

View File

@@ -71,6 +71,11 @@ query($page: Int){
}
}
markdownPage(id: "home") {
id
metaImg
}
topics: allBlogTag {
edges{
node{
@@ -119,8 +124,51 @@ export default {
};
},
metaInfo: {
title: "Blog",
metaInfo() {
return {
title: "",
titleTemplate: "ThreeFold | Blog",
meta: [
{
key: "description",
name: "description",
content:
"A collection of posts from the ThreeFold Foundation team about our products, our technology, our ecosystem, our why, and more.",
},
{
key: "og:title",
property: "og:title",
content: "ThreeFold | Blog",
},
{
key: "og:description",
property: "og:description",
content:
"A collection of posts from the ThreeFold Foundation team about our products, our technology, our ecosystem, our why, and more.",
},
{
key: "og:image",
property: "og:image",
content: this.getImg,
},
{
key: "twitter:description",
name: "twitter:description",
content:
"A collection of posts from the ThreeFold Foundation team about our products, our technology, our ecosystem, our why, and more.",
},
{
key: "twitter:image",
property: "twitter:image",
content: this.getImg,
},
{
key: "twitter:title",
property: "twitter:title",
content: "ThreeFold | Blog",
},
],
};
},
components: {
PostListItem,
@@ -198,6 +246,13 @@ export default {
return window.innerHeight - 100;
}
},
getImg() {
let img = "";
if (process.isClient) {
img = `${window.location.origin}${this.$page.markdownPage.metaImg.src}`;
}
return img;
},
blogs() {
var res = {};