Added gatsby netlify plugin, changed file structure and config
This commit is contained in:
@@ -3,6 +3,7 @@ module.exports = {
|
||||
title: 'Saburly',
|
||||
},
|
||||
plugins: [
|
||||
'gatsby-plugin-netlify',
|
||||
'gatsby-plugin-react-helmet',
|
||||
{
|
||||
resolve: 'gatsby-source-wordpress',
|
||||
|
||||
@@ -25,7 +25,7 @@ exports.createPages = ({ graphql, boundActionCreators }) => {
|
||||
result.data.allWordpressPost.edges.forEach(({ node }) => {
|
||||
createPage({
|
||||
path: `blog/${node.slug}`,
|
||||
component: path.resolve('./src/layouts/post-default.js'),
|
||||
component: path.resolve('./src/templates/post-default.js'),
|
||||
context: {
|
||||
slug: node.slug,
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"dependencies": {
|
||||
"gatsby": "^1.9.247",
|
||||
"gatsby-link": "^1.6.40",
|
||||
"gatsby-plugin-netlify": "^1.0.21",
|
||||
"gatsby-plugin-react-helmet": "^2.0.10",
|
||||
"gatsby-source-wordpress": "^2.0.93",
|
||||
"react-helmet": "^5.2.0"
|
||||
@@ -31,4 +32,4 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/gatsbyjs/gatsby-starter-default"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,17 +3,11 @@ import Link from 'gatsby-link'
|
||||
|
||||
const Header = ({ siteTitle }) => (
|
||||
<header>
|
||||
<h1 style={{ margin: 0 }}>
|
||||
<Link
|
||||
to="/"
|
||||
style={{
|
||||
color: 'white',
|
||||
textDecoration: 'none',
|
||||
}}
|
||||
>
|
||||
<nav>
|
||||
<Link to="/">
|
||||
{siteTitle}
|
||||
</Link>
|
||||
</h1>
|
||||
</nav>
|
||||
</header>
|
||||
)
|
||||
|
||||
|
||||
@@ -381,7 +381,6 @@ p {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
|
||||
[role=button] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
41
yarn.lock
41
yarn.lock
@@ -1698,7 +1698,7 @@ chalk@2.4.0:
|
||||
escape-string-regexp "^1.0.5"
|
||||
supports-color "^5.3.0"
|
||||
|
||||
chalk@2.4.1, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.1:
|
||||
chalk@2.4.1, chalk@^2.0, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.1:
|
||||
version "2.4.1"
|
||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e"
|
||||
dependencies:
|
||||
@@ -3341,6 +3341,15 @@ gatsby-module-loader@^1.0.11:
|
||||
babel-runtime "^6.26.0"
|
||||
loader-utils "^0.2.16"
|
||||
|
||||
gatsby-plugin-netlify@^1.0.21:
|
||||
version "1.0.21"
|
||||
resolved "https://registry.yarnpkg.com/gatsby-plugin-netlify/-/gatsby-plugin-netlify-1.0.21.tgz#a4cd6631e2c73d73177f1ce8532f125601c8c426"
|
||||
dependencies:
|
||||
babel-runtime "^6.26.0"
|
||||
fs-extra "^4.0.2"
|
||||
lodash "^4.17.4"
|
||||
webpack-assets-manifest "^1.0.0"
|
||||
|
||||
gatsby-plugin-page-creator@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/gatsby-plugin-page-creator/-/gatsby-plugin-page-creator-1.0.1.tgz#6bad33a7f46cb5b87dbdaacc3c1bbd81ac63bc20"
|
||||
@@ -4758,6 +4767,18 @@ lodash.foreach@^4.3.0:
|
||||
version "4.5.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53"
|
||||
|
||||
lodash.get@^4.0:
|
||||
version "4.4.2"
|
||||
resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
|
||||
|
||||
lodash.has@^4.0:
|
||||
version "4.5.2"
|
||||
resolved "https://registry.yarnpkg.com/lodash.has/-/lodash.has-4.5.2.tgz#d19f4dc1095058cccbe2b0cdf4ee0fe4aa37c862"
|
||||
|
||||
lodash.keys@^4.0:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-4.2.0.tgz#a08602ac12e4fb83f91fc1fb7a360a4d9ba35205"
|
||||
|
||||
lodash.map@^4.4.0:
|
||||
version "4.6.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3"
|
||||
@@ -4766,7 +4787,7 @@ lodash.memoize@^4.1.2:
|
||||
version "4.1.2"
|
||||
resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
|
||||
|
||||
lodash.merge@^4.4.0:
|
||||
lodash.merge@^4.0, lodash.merge@^4.4.0:
|
||||
version "4.6.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.1.tgz#adc25d9cb99b9391c59624f379fbba60d7111d54"
|
||||
|
||||
@@ -4782,7 +4803,7 @@ lodash.padstart@^4.1.0:
|
||||
version "4.6.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash.padstart/-/lodash.padstart-4.6.1.tgz#d2e3eebff0d9d39ad50f5cbd1b52a7bce6bb611b"
|
||||
|
||||
lodash.pick@^4.2.1:
|
||||
lodash.pick@^4.0, lodash.pick@^4.2.1:
|
||||
version "4.4.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3"
|
||||
|
||||
@@ -5126,7 +5147,7 @@ mixin-deep@^1.2.0:
|
||||
for-in "^1.0.2"
|
||||
is-extendable "^1.0.1"
|
||||
|
||||
mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1:
|
||||
mkdirp@^0.5, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1:
|
||||
version "0.5.1"
|
||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
|
||||
dependencies:
|
||||
@@ -8301,6 +8322,18 @@ watchpack@^0.2.1:
|
||||
chokidar "^1.0.0"
|
||||
graceful-fs "^4.1.2"
|
||||
|
||||
webpack-assets-manifest@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/webpack-assets-manifest/-/webpack-assets-manifest-1.0.0.tgz#54a1bc4036e2eed2b3ce1fd6a7e31c09be99538a"
|
||||
dependencies:
|
||||
chalk "^2.0"
|
||||
lodash.get "^4.0"
|
||||
lodash.has "^4.0"
|
||||
lodash.keys "^4.0"
|
||||
lodash.merge "^4.0"
|
||||
lodash.pick "^4.0"
|
||||
mkdirp "^0.5"
|
||||
|
||||
webpack-configurator@^0.3.0:
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/webpack-configurator/-/webpack-configurator-0.3.1.tgz#d16802afa674101a0cbfa6fc344d415c9649540b"
|
||||
|
||||
Reference in New Issue
Block a user