refactor
This commit is contained in:
parent
5f761b934c
commit
80020b8f59
7
.babelrc
7
.babelrc
|
@ -10,7 +10,6 @@
|
|||
"@config": "./src/config",
|
||||
"@features": "./src/features",
|
||||
"@images": "./src/images",
|
||||
"@libs": "./src/libs",
|
||||
"@utils": "./src/utils"
|
||||
}
|
||||
}
|
||||
|
@ -19,32 +18,26 @@
|
|||
"babel-plugin-transform-imports",
|
||||
{
|
||||
"@material-ui/core": {
|
||||
// Use "transform: '@material-ui/core/${member}'," if your bundler does not support ES modules
|
||||
"transform": "@material-ui/core/${member}",
|
||||
"preventFullImport": true
|
||||
},
|
||||
"@material-ui/lab": {
|
||||
// Use "transform: '@material-ui/lab/${member}'," if your bundler does not support ES modules
|
||||
"transform": "@material-ui/lab/${member}",
|
||||
"preventFullImport": true
|
||||
},
|
||||
"@material-ui/icons": {
|
||||
// Use "transform: '@material-ui/icons/${member}'," if your bundler does not support ES modules
|
||||
"transform": "@material-ui/icons/${member}",
|
||||
"preventFullImport": true
|
||||
},
|
||||
"lodash": {
|
||||
// Use "transform: 'lodash/${member}'," if your bundler does not support ES modules
|
||||
"transform": "lodash/${member}",
|
||||
"preventFullImport": true
|
||||
},
|
||||
"date-fns": {
|
||||
// Use "transform: 'date-fns/${member}'," if your bundler does not support ES modules
|
||||
"transform": "date-fns/${member}",
|
||||
"preventFullImport": true
|
||||
},
|
||||
"validator": {
|
||||
// Use "transform: 'validator/${member}'," if your bundler does not support ES modules
|
||||
"transform": "validator/lib/${member}",
|
||||
"preventFullImport": true
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ module.exports = {
|
|||
siteMetadata: {
|
||||
title: `Dawid Wysokiński | Full Stack Web Developer`,
|
||||
description: `Dawid Wysokiński - Full Stack Web Developer | Backend Developer | Frontend Developer | Go Developer | React Developer | Node.js Developer`,
|
||||
authorTwitter: `@Dawid56143781`,
|
||||
authorFullName: 'Dawid Wysokiński',
|
||||
siteUrl: SITE_URL,
|
||||
email: 'contact@dwysokinski.me',
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
"@config/*": ["src/config/*"],
|
||||
"@features/*": ["src/features/*"],
|
||||
"@images/*": ["src/images/*"],
|
||||
"@libs/*": ["src/libs/*"],
|
||||
"@utils/*": ["src/utils/*"]
|
||||
}
|
||||
},
|
||||
|
|
|
@ -2,20 +2,21 @@ import React from 'react';
|
|||
import PropTypes from 'prop-types';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import { useStaticQuery, graphql } from 'gatsby';
|
||||
import ogThumbnail from '@images/og_thumbnail.png';
|
||||
|
||||
function Seo({ description, lang, meta, title, pathname }) {
|
||||
const { site } = useStaticQuery(
|
||||
const { site, thumbnail } = useStaticQuery(
|
||||
graphql`
|
||||
query {
|
||||
{
|
||||
site {
|
||||
siteMetadata {
|
||||
title
|
||||
description
|
||||
siteUrl
|
||||
authorTwitter
|
||||
}
|
||||
}
|
||||
thumbnail: file(base: { eq: "thumbnail.png" }) {
|
||||
publicURL
|
||||
}
|
||||
}
|
||||
`
|
||||
);
|
||||
|
@ -52,7 +53,7 @@ function Seo({ description, lang, meta, title, pathname }) {
|
|||
},
|
||||
{
|
||||
property: `og:image`,
|
||||
content: `${site.siteMetadata.siteUrl}${ogThumbnail}`,
|
||||
content: `${site.siteMetadata.siteUrl}${thumbnail.publicURL}`,
|
||||
},
|
||||
{
|
||||
property: `og:image:width`,
|
||||
|
@ -70,10 +71,6 @@ function Seo({ description, lang, meta, title, pathname }) {
|
|||
property: `og:locale`,
|
||||
content: `en`,
|
||||
},
|
||||
{
|
||||
name: `twitter:creator`,
|
||||
content: site.siteMetadata.authorTwitter,
|
||||
},
|
||||
{
|
||||
name: `twitter:card`,
|
||||
content: `summary_large_image`,
|
||||
|
@ -92,7 +89,7 @@ function Seo({ description, lang, meta, title, pathname }) {
|
|||
},
|
||||
{
|
||||
name: `twitter:image`,
|
||||
content: `${site.siteMetadata.siteUrl}${ogThumbnail}`,
|
||||
content: `${site.siteMetadata.siteUrl}${thumbnail.publicURL}`,
|
||||
},
|
||||
{
|
||||
name: `twitter:image:alt`,
|
||||
|
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Loading…
Reference in New Issue