mirror of
https://github.com/Unkn0wnCat/KevinK.dev.js.git
synced 2025-05-01 11:17:15 +02:00
Translate description
This commit is contained in:
parent
ebb4f4d515
commit
8757b1afb3
4 changed files with 7 additions and 5 deletions
|
@ -1,7 +1,6 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
siteMetadata: {
|
siteMetadata: {
|
||||||
title: `KevinK.dev`,
|
title: `KevinK.dev`,
|
||||||
description: `Hallo, ich bin Kevin Kandlbinder, ein Entwickler und Hobby-Fotograf aus Norddeutschland.`,
|
|
||||||
author: `@Unkn0wnKevin`,
|
author: `@Unkn0wnKevin`,
|
||||||
siteUrl: `https://kevink.dev`,
|
siteUrl: `https://kevink.dev`,
|
||||||
},
|
},
|
||||||
|
@ -25,7 +24,7 @@ module.exports = {
|
||||||
{
|
{
|
||||||
resolve: `gatsby-plugin-offline`,
|
resolve: `gatsby-plugin-offline`,
|
||||||
options: {
|
options: {
|
||||||
precachePages: ["/", "/projects", "/projects/*", "/social", "/social/*"],
|
precachePages: ["/en", "/de"],
|
||||||
workboxConfig: {
|
workboxConfig: {
|
||||||
globPatterns: ['**/*']
|
globPatterns: ['**/*']
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
"siteDescription": "Hallo, ich bin Kevin Kandlbinder, ein Entwickler und Hobby-Fotograf aus Norddeutschland.",
|
||||||
"imprint": "Impressum",
|
"imprint": "Impressum",
|
||||||
"datasec": "Datenschutz",
|
"datasec": "Datenschutz",
|
||||||
"disclaimer": "Disclaimer",
|
"disclaimer": "Disclaimer",
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
"siteDescription": "Hello, I am Kevin Kandlbinder, a developer and hobby photographer from northern Germany.",
|
||||||
"imprint": "Imprint",
|
"imprint": "Imprint",
|
||||||
"datasec": "Data Protection",
|
"datasec": "Data Protection",
|
||||||
"disclaimer": "Disclaimer",
|
"disclaimer": "Disclaimer",
|
||||||
|
|
|
@ -2,15 +2,16 @@ import React from "react"
|
||||||
import PropTypes from "prop-types"
|
import PropTypes from "prop-types"
|
||||||
import { Helmet } from "gatsby-plugin-react-i18next"
|
import { Helmet } from "gatsby-plugin-react-i18next"
|
||||||
import { useStaticQuery, graphql } from "gatsby"
|
import { useStaticQuery, graphql } from "gatsby"
|
||||||
|
import {useTranslation} from 'gatsby-plugin-react-i18next';
|
||||||
|
|
||||||
function SEO({ description, lang, meta, title }) {
|
function SEO({ description, meta, title }) {
|
||||||
|
const {t} = useTranslation();
|
||||||
const { site } = useStaticQuery(
|
const { site } = useStaticQuery(
|
||||||
graphql`
|
graphql`
|
||||||
query {
|
query {
|
||||||
site {
|
site {
|
||||||
siteMetadata {
|
siteMetadata {
|
||||||
title
|
title
|
||||||
description
|
|
||||||
author
|
author
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,7 +19,7 @@ function SEO({ description, lang, meta, title }) {
|
||||||
`
|
`
|
||||||
)
|
)
|
||||||
|
|
||||||
const metaDescription = description || site.siteMetadata.description
|
const metaDescription = description || t("siteDescription");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Helmet
|
<Helmet
|
||||||
|
|
Loading…
Add table
Reference in a new issue