This commit is contained in:
LBlend committed 2021-07-23 18:02:36 +02:00
1 parent 26cd71cb52
commit 385bcba060
4 files changed
+24 -5

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@ module.exports = {
description: `En hobbyforening som ønsker skape et sosialt miljø rundt gaming og E-sport på UiO!`,
author: `@uiogaming`,
url: `https://uiogaming.no`,
image: `/images/logo.jpg`
image: `logo.jpg`,
},
plugins: [
`gatsby-plugin-react-helmet`,
+4 -1
View File
@@ -21,6 +21,7 @@ export const query = graphql`
}
mainImage {
asset {
url
gatsbyImageData
}
}
@@ -60,7 +61,9 @@ const BlogPost = ({ data }) => {
<>
<Seo
title={data.sanityPost.title}
image={data.sanityPost.mainImage.asset.GatsbyImage}
image={data.sanityPost.mainImage.asset.url}
description={data.sanityPost.excerpt}
author={data.sanityPost.author.name}
/>
<div className={styles.container}>
<article>
+4 -1
View File
@@ -23,7 +23,10 @@ export const query = graphql`
const Event = ({ data }) => {
return (
<>
<Seo title={data.sanityEvent.title} />
<Seo
title={data.sanityEvent.title}
description={`Tidspunkt: ${data.sanityEvent.date}\nSted: ${data.sanityEvent.location}\n\n${data.sanityEvent.description}`}
/>
<div className={styles.container}>
<Back />
<div className={styles.event}>
+15 -2
View File
@@ -10,7 +10,7 @@ import PropTypes from "prop-types"
import { Helmet } from "react-helmet"
import { useStaticQuery, graphql } from "gatsby"
function Seo({ description, lang, meta, image: metaImage, title }) {
function Seo({ description, lang, meta, image: metaImage, title, author }) {
const { site } = useStaticQuery(
graphql`
query {
@@ -26,6 +26,7 @@ function Seo({ description, lang, meta, image: metaImage, title }) {
`
)
const metaAuthor = author || site.siteMetadata.author
const metaDescription = description || site.siteMetadata.description
const defaultTitle = site.siteMetadata?.title
@@ -42,6 +43,10 @@ function Seo({ description, lang, meta, image: metaImage, title }) {
title={title}
titleTemplate={defaultTitle ? `%s | ${defaultTitle}` : null}
meta={[
{
name: `author`,
content: metaAuthor,
},
{
name: `description`,
content: metaDescription,
@@ -50,6 +55,10 @@ function Seo({ description, lang, meta, image: metaImage, title }) {
name: "keywords",
content: site.siteMetadata.keywords.join(","),
},
{
property: `og:site_name`,
content: site.siteMetadata.title,
},
{
property: `og:title`,
content: title,
@@ -62,9 +71,13 @@ function Seo({ description, lang, meta, image: metaImage, title }) {
property: `og:type`,
content: `website`,
},
{
property: `og:locale`,
content: `nb_NO`,
},
{
name: `twitter:creator`,
content: site.siteMetadata.author,
content: metaAuthor,
},
{
name: `twitter:title`,