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