Skip to content

Commit f25ec64

Browse files
committed
Merge branch 'develop'
2 parents b6f152c + 1b6bf38 commit f25ec64

38 files changed

+1649
-1955
lines changed

gatsby-config.js

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -25,42 +25,13 @@ module.exports = {
2525
'/.netlify/functions/',
2626
proxy({
2727
target: 'http://localhost:34567',
28-
pathRewrite: {
29-
'/.netlify/functions/': '',
30-
},
28+
pathRewrite: { '/.netlify/functions/': '' },
3129
}),
3230
);
3331
},
3432
plugins: [
35-
{
36-
resolve: 'gatsby-plugin-netlify-cms',
37-
options: {
38-
modulePath: `${__dirname}/src/cms/cms.js`,
39-
manualInit: true,
40-
},
41-
},
42-
{
43-
resolve: 'gatsby-source-filesystem',
44-
options: { path: `${__dirname}/static/assets`, name: 'assets' },
45-
},
46-
...['menus', 'pages', 'posts'].map((name) => ({
47-
resolve: 'gatsby-source-filesystem',
48-
options: { name, path: `${__dirname}/src/cms/${name}` },
49-
})),
33+
{ resolve: '@mrozilla/gatsby-theme-netlify_cms' },
5034

51-
'gatsby-transformer-sharp',
52-
53-
{
54-
resolve: 'gatsby-plugin-mdx',
55-
options: {
56-
gatsbyRemarkPlugins: [
57-
{
58-
resolve: 'gatsby-remark-images',
59-
options: { maxWidth: 590 },
60-
},
61-
],
62-
},
63-
},
6435
{
6536
resolve: 'gatsby-plugin-google-analytics',
6637
options: {
@@ -109,10 +80,8 @@ module.exports = {
10980
displayName: NODE_ENV === 'development',
11081
},
11182
},
112-
'gatsby-plugin-sharp',
113-
'gatsby-plugin-sitemap',
114-
// 'gatsby-plugin-offline', // disabled for now
115-
'gatsby-plugin-react-helmet',
83+
{ resolve: 'gatsby-plugin-sitemap' },
84+
{ resolve: 'gatsby-plugin-react-helmet' },
11685
{
11786
resolve: 'gatsby-plugin-netlify',
11887
options: {

gatsby-node.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
const { onCreateBabelConfig } = require('./gatsby/onCreateBabelConfig');
66
const { onCreateWebpackConfig } = require('./gatsby/onCreateWebpackConfig');
7-
const { onCreateNode } = require('./gatsby/onCreateNode');
8-
const { onCreateDevServer } = require('./gatsby/onCreateDevServer');
97
const { createPages } = require('./gatsby/createPages');
108

119
// ─────────────────────────────────────────────────────────────────────────────
@@ -14,6 +12,4 @@ const { createPages } = require('./gatsby/createPages');
1412

1513
exports.onCreateBabelConfig = onCreateBabelConfig; // babel
1614
exports.onCreateWebpackConfig = onCreateWebpackConfig; // aliases
17-
exports.onCreateNode = onCreateNode; // node transformations
1815
exports.createPages = createPages; // automatic pages
19-
exports.onCreateDevServer = onCreateDevServer; // netlify CMS setup

gatsby/createPages.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ exports.createPages = ({ actions: { createPage }, graphql }) => {
1616
{
1717
pages: allMdx(
1818
filter: {
19-
fields: { sourceName: { eq: "pages" } }
19+
fileAbsolutePath: { regex: "/cms/pages/" }
2020
frontmatter: { meta: { permalink: { ne: "/demo/" } } }
2121
}
2222
) {
@@ -30,7 +30,7 @@ exports.createPages = ({ actions: { createPage }, graphql }) => {
3030
}
3131
posts: allMdx(
3232
filter: {
33-
fields: { sourceName: { eq: "posts" } }
33+
fileAbsolutePath: { regex: "/cms/posts/" }
3434
frontmatter: { meta: { permalink: { ne: "/blog/demo/" } } }
3535
}
3636
) {

gatsby/onCreateDevServer.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

gatsby/onCreateNode.js

Lines changed: 0 additions & 69 deletions
This file was deleted.

package.json

Lines changed: 20 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,60 +7,47 @@
77
"repository": "https://github.com/mrozilla/gatsby-starter-netlify_cms",
88
"bugs": "https://github.com/mrozilla/gatsby-starter-netlify_cms/issues",
99
"author": "Jan Hruby <[email protected]>",
10+
"scripts": {
11+
"start:gatsby": "gatsby develop",
12+
"start": "yarn start:gatsby",
13+
"build:gatsby": "gatsby build",
14+
"build": "yarn build:gatsby",
15+
"serve": "gatsby serve",
16+
"lint": "eslint 'src/**/*.js'",
17+
"bump": "yarn upgrade-interactive --latest",
18+
"purge": "rm -rf node_modules && yarn"
19+
},
1020
"dependencies": {
11-
"@mdx-js/mdx": "^1.5.1",
1221
"@mdx-js/react": "^1.5.1",
13-
"gatsby": "2.16.4",
22+
"@mrozilla/gatsby-theme-netlify_cms": "0.0.3",
23+
"gatsby": "2.17.7",
1424
"gatsby-plugin-google-analytics": "2.1.23",
15-
"gatsby-plugin-manifest": "2.2.23",
16-
"gatsby-plugin-mdx": "^1.0.52",
17-
"gatsby-plugin-netlify": "2.1.22",
18-
"gatsby-plugin-netlify-cms": "^4.1.25",
19-
"gatsby-plugin-offline": "3.0.16",
25+
"gatsby-plugin-manifest": "2.2.26",
26+
"gatsby-plugin-netlify": "2.1.23",
2027
"gatsby-plugin-react-helmet": "3.1.13",
2128
"gatsby-plugin-robots-txt": "^1.5.0",
22-
"gatsby-plugin-sharp": "2.2.32",
2329
"gatsby-plugin-sitemap": "2.2.19",
2430
"gatsby-plugin-styled-components": "3.1.11",
25-
"gatsby-remark-images": "3.1.28",
26-
"gatsby-source-filesystem": "2.1.33",
27-
"gatsby-transformer-sharp": "^2.2.23",
28-
"lodash": "^4.17.15",
29-
"map-obj": "^4.1.0",
30-
"netlify-cms-app": "^2.9.8-beta.4",
31-
"netlify-cms-backend-fs": "0.4.4",
3231
"prop-types": "^15.7.2",
33-
"react": "16.10.2",
34-
"react-dom": "16.10.2",
32+
"react": "16.11.0",
33+
"react-dom": "16.11.0",
3534
"react-helmet": "^5.2.1",
36-
"react-icons": "^3.7.0",
37-
"styled-components": "^4.4.0",
35+
"react-icons": "^3.8.0",
36+
"styled-components": "^4.4.1",
3837
"zxcvbn": "^4.4.2"
3938
},
4039
"devDependencies": {
41-
"@babel/core": "^7.6.4",
4240
"@babel/plugin-proposal-optional-chaining": "^7.6.0",
43-
"@babel/preset-env": "^7.6.3",
44-
"@babel/preset-react": "^7.6.3",
4541
"babel-eslint": "^10.0.3",
4642
"babel-plugin-styled-components": "^1.10.6",
47-
"eslint": "^6.5.1",
43+
"eslint": "^6.6.0",
4844
"eslint-config-airbnb": "^18.0.1",
4945
"eslint-import-resolver-alias": "^1.1.2",
5046
"eslint-plugin-import": "^2.18.2",
5147
"eslint-plugin-jsx-a11y": "^6.2.3",
5248
"eslint-plugin-prettier": "^3.1.1",
5349
"eslint-plugin-react": "^7.16.0",
50+
"http-proxy-middleware": "^0.20.0",
5451
"prettier": "^1.18.2"
55-
},
56-
"scripts": {
57-
"start:gatsby": "gatsby develop",
58-
"start": "yarn start:gatsby",
59-
"build:gatsby": "gatsby build",
60-
"build": "yarn build:gatsby",
61-
"serve": "gatsby serve",
62-
"lint": "eslint 'src/**/*.js'",
63-
"bump": "yarn upgrade-interactive --latest",
64-
"purge": "rm -rf node_modules && yarn"
6552
}
6653
}

src/cms/cms.js

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/cms/pages/about-contact.mdx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@ meta:
77
permalink: /about/contact/
88
title: Contact
99
blocks:
10-
- buttons:
11-
- look: primary
12-
title: Primary
13-
url: 'mailto:[email protected]'
14-
mdx: >-
15-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
16-
tempor incididunt ut labore et dolore magna aliqua.
17-
title: Short headline that just fits
10+
- header:
11+
- title: Short headline that just fits
12+
type: title
13+
- mdx: >-
14+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
15+
tempor incididunt ut labore et dolore magna aliqua.
16+
type: mdx
17+
- buttons:
18+
- look: primary
19+
title: Primary
20+
url: 'mailto:[email protected]'
21+
type: buttons
1822
type: hero
1923
---
2024

src/cms/pages/about-faq.mdx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@ meta:
77
permalink: /about/faq/
88
title: FAQ
99
blocks:
10-
- faq:
10+
- header:
11+
- subtitle: >-
12+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
13+
tempor incididunt ut labore et dolore magna aliqua.
14+
type: subtitle
15+
- title: Short headline that just fits
16+
type: title
17+
faq:
1118
- mdx: >-
1219
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
1320
@@ -43,9 +50,5 @@ blocks:
4350
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
4451
eiusmod tempor incididunt ut labore et dolore magna aliqua.
4552
title: Et dolore magna aliqua?
46-
subtitle: >-
47-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
48-
tempor incididunt ut labore et dolore magna aliqua.
49-
title: Short headline that just fits
5053
type: faq
5154
---

src/cms/pages/about-jobs.mdx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ meta:
77
permalink: /about/jobs/
88
title: Jobs
99
blocks:
10-
- mdx: >-
11-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
12-
tempor incididunt ut labore et dolore magna aliqua.
13-
title: Short headline that just fits
10+
- header:
11+
- mdx: >-
12+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
13+
tempor incididunt ut labore et dolore magna aliqua.
14+
type: mdx
15+
- title: Short headline that just fits
16+
type: title
1417
jobs:
1518
- title: VP of Lorem ipsum
1619
url: "https://example.com/"

0 commit comments

Comments
 (0)