diff --git a/gatsby-config.js b/gatsby-config.js index 6320904..a6a07c9 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -9,10 +9,15 @@ module.exports = { 'gatsby-plugin-react-helmet', 'gatsby-plugin-sitemap', 'gatsby-transformer-json', + 'gatsby-transformer-sharp', + 'gatsby-plugin-sharp', { resolve: 'gatsby-plugin-sass', options: { - includePaths: [`${__dirname}/node_modules`, `${__dirname}/src/styles`], + includePaths: [ + `${__dirname}/node_modules`, + `${__dirname}/src/styles` + ], }, }, { @@ -22,6 +27,13 @@ module.exports = { path: `${__dirname}/data/`, }, }, + { + resolve: 'gatsby-source-filesystem', + options: { + name: 'images', + path: `${__dirname}/src/images`, + }, + }, { resolve: 'gatsby-plugin-google-analytics', options: { diff --git a/package.json b/package.json index f286d22..fe69039 100644 --- a/package.json +++ b/package.json @@ -3,15 +3,18 @@ "version": "0.1.0", "private": true, "dependencies": { - "gatsby": "^1.9.251", + "gatsby": "^1.9.252", + "gatsby-image": "^1.0.46", "gatsby-link": "^1.6.39", "gatsby-plugin-google-analytics": "^1.0.30", "gatsby-plugin-react-helmet": "^2.0.8", "gatsby-plugin-react-next": "^1.0.11", "gatsby-plugin-sass": "^1.0.25", + "gatsby-plugin-sharp": "^1.6.42", "gatsby-plugin-sitemap": "^1.2.21", - "gatsby-source-filesystem": "^1.5.32", + "gatsby-source-filesystem": "^1.5.33", "gatsby-transformer-json": "^1.0.16", + "gatsby-transformer-sharp": "^1.6.22", "react-helmet": "^5.2.0", "react-markdown": "^3.3.0", "react-transition-group": "^2.3.1" @@ -23,7 +26,7 @@ "eslint-plugin-graphql": "^1.5.0", "eslint-plugin-prettier": "^2.6.0", "eslint-plugin-react": "^7.7.0", - "prettier": "^1.12.0", + "prettier": "^1.12.1", "stylelint": "^9.2.0", "stylelint-config-standard": "^18.2.0" }, diff --git a/src/components/organisms/Project.js b/src/components/organisms/Project.js index 46e93dc..a6522e8 100644 --- a/src/components/organisms/Project.js +++ b/src/components/organisms/Project.js @@ -23,7 +23,8 @@ const Project = ({ pathContext }) => { previous, } = project - return + return ( + {title} @@ -39,7 +40,8 @@ const Project = ({ pathContext }) => { {title} - {!!img_more && + {!!img_more && + {img_more.map(key => ( { alt={title} /> ))} - } + + }