1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2025-01-03 10:25:00 +01:00

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" "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": [ "techstack": [
"Sketch", "Sketch",
"Jekyll", "Jekyll",

View File

@ -6,26 +6,21 @@ module.exports = {
siteUrl: `${url}`, siteUrl: `${url}`,
}, },
plugins: [ plugins: [
'gatsby-plugin-react-next',
'gatsby-plugin-react-helmet',
'gatsby-transformer-json',
'gatsby-plugin-offline',
'gatsby-plugin-remove-trailing-slashes',
{ {
resolve: 'gatsby-plugin-sass', resolve: 'gatsby-plugin-sass',
options: { options: {
includePaths: [ includePaths: [
`${__dirname}/node_modules`, `${__dirname}/node_modules`,
`${__dirname}/src/styles` `${__dirname}/src/styles`
] ],
} },
}, },
{ {
resolve: 'gatsby-source-filesystem', resolve: 'gatsby-source-filesystem',
options: { options: {
name: 'data', name: 'data',
path: `${__dirname}/data/`, path: `${__dirname}/data/`,
} },
}, },
{ {
resolve: 'gatsby-plugin-google-analytics', resolve: 'gatsby-plugin-google-analytics',
@ -34,7 +29,11 @@ module.exports = {
head: false, head: false,
anonymize: true, anonymize: true,
respectDNT: 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": "^1.9.253",
"gatsby-link": "^1.6.41", "gatsby-link": "^1.6.41",
"gatsby-plugin-google-analytics": "^1.0.31", "gatsby-plugin-google-analytics": "^1.0.31",
"gatsby-plugin-offline": "^1.0.15",
"gatsby-plugin-react-helmet": "^2.0.11", "gatsby-plugin-react-helmet": "^2.0.11",
"gatsby-plugin-react-next": "^1.0.11", "gatsby-plugin-react-next": "^1.0.11",
"gatsby-plugin-remove-trailing-slashes": "^1.0.9", "gatsby-plugin-remove-trailing-slashes": "^1.0.9",

View File

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

View File

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