data flow tweaks

This commit is contained in:
Matthias Kretschmann 2018-04-21 15:46:04 +02:00
parent 70c6824e81
commit e9073bf677
Signed by: m
GPG Key ID: 606EEEF3C479A91F
6 changed files with 32 additions and 35 deletions

2
.prettierignore Normal file
View File

@ -0,0 +1,2 @@
node_modules/
.cache/

View File

@ -42,7 +42,7 @@
"url": "https://github.com/ipdb/website"
}
],
"description": "Laudem antiopam mea eu. Nam in accusam mediocritatem, eos ad paulo putent, pericula appellantur te ius. Magna debet id cum, probo eloquentiam sea ut. Cu eam graeco disputationi, graece theophrastus no his, duo errem expetendis te. Duo ea soleat ignota temporibus, in vim scaevola salutandi. Postea possit est at, ea vitae necessitatibus vix.\n\nKey visuals in collaboration with [Wojciech Hupert](https://twitter.com/wojciechhupert).",
"description": "Iterating on the creative and visual direction of the IPDB brand and leading the UI design & development of all IPDB web properties.\n\nKey visuals in collaboration with [Wojciech Hupert](https://twitter.com/wojciechhupert).",
"techstack": [
"Sketch",
"Jekyll",

View File

@ -6,26 +6,21 @@ module.exports = {
siteUrl: `${url}`,
},
plugins: [
'gatsby-plugin-react-next',
'gatsby-plugin-react-helmet',
'gatsby-transformer-json',
'gatsby-plugin-offline',
'gatsby-plugin-remove-trailing-slashes',
{
resolve: 'gatsby-plugin-sass',
options: {
includePaths: [
`${__dirname}/node_modules`,
`${__dirname}/src/styles`
]
}
],
},
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'data',
path: `${__dirname}/data/`,
}
},
},
{
resolve: 'gatsby-plugin-google-analytics',
@ -34,7 +29,11 @@ module.exports = {
head: false,
anonymize: true,
respectDNT: true,
}
}
]
},
},
'gatsby-plugin-react-next',
'gatsby-plugin-react-helmet',
'gatsby-transformer-json',
'gatsby-plugin-remove-trailing-slashes'
],
}

View File

@ -6,7 +6,6 @@
"gatsby": "^1.9.253",
"gatsby-link": "^1.6.41",
"gatsby-plugin-google-analytics": "^1.0.31",
"gatsby-plugin-offline": "^1.0.15",
"gatsby-plugin-react-helmet": "^2.0.11",
"gatsby-plugin-react-next": "^1.0.11",
"gatsby-plugin-remove-trailing-slashes": "^1.0.9",

View File

@ -6,7 +6,7 @@ import Footer from '../components/organisms/Footer'
import './index.scss'
const TemplateWrapper = ({ data, location, children }) => {
const meta = data.allDataJson.edges[0].node
const meta = data.dataJson
const isHomepage = location.pathname === '/'
return (
@ -22,34 +22,30 @@ const TemplateWrapper = ({ data, location, children }) => {
}
TemplateWrapper.propTypes = {
children: PropTypes.any,
data: PropTypes.object,
location: PropTypes.object,
children: PropTypes.func,
data: PropTypes.object.isRequired,
location: PropTypes.object.isRequired,
}
export default TemplateWrapper
export const query = graphql`
query metaQuery {
allDataJson {
edges {
node {
title
tagline
description
url
social {
Email
Blog
Twitter
GitHub
Dribbble
}
availability
typekit
googleanalytics
}
dataJson {
title
tagline
description
url
social {
Email
Blog
Twitter
GitHub
Dribbble
}
availability
typekit
googleanalytics
}
}
`

View File

@ -79,6 +79,7 @@ export const projectQuery = graphql`
query ProjectBySlug($slug: String!) {
projectsJson(slug: { eq: $slug }) {
title
slug
img
img_more
description