-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update website to work
- Loading branch information
Showing
50 changed files
with
9,438 additions
and
329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,3 +34,7 @@ reports | |
test/e2e/drivers/* | ||
|
||
package-lock.json | ||
|
||
# Website dependencies | ||
website/.cache | ||
website/public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Global settings applied to the whole site. | ||
[build] | ||
base = "www" | ||
publish = "www/public" | ||
base = "website" | ||
publish = "website/public" | ||
command = "gatsby build" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"presets": [ | ||
"es2015", | ||
"stage-0", | ||
"react", | ||
], | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module.exports = { | ||
siteMetadata: { | ||
title: 'KeystoneJS', | ||
}, | ||
plugins: [ | ||
'gatsby-plugin-react-helmet', | ||
'gatsby-plugin-glamor', | ||
{ | ||
resolve: `gatsby-source-filesystem`, | ||
options: { | ||
name: `docs`, | ||
path: `${__dirname}/../docs`, | ||
}, | ||
}, | ||
{ | ||
resolve: `gatsby-source-filesystem`, | ||
options: { | ||
name: `fields`, | ||
path: `${__dirname}/../fields/types`, | ||
}, | ||
}, | ||
'gatsby-transformer-remark', | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
/** | ||
* Implement Gatsby's Node APIs in this file. | ||
* | ||
* See: https://www.gatsbyjs.org/docs/node-apis/ | ||
*/ | ||
const kebabCase = require('lodash.kebabcase'); | ||
const path = require('path'); | ||
|
||
exports.onCreateNode = ( | ||
{ node, boundActionCreators, getNode } /* : NodeParams */ | ||
) => { | ||
const { createNodeField } = boundActionCreators; | ||
|
||
|
||
if (node.internal.type === 'MarkdownRemark') { | ||
const fileNode = getNode(node.parent); | ||
|
||
const parsedFilePath = path.parse(fileNode.relativePath); | ||
let section = parsedFilePath.dir; | ||
let slug; | ||
|
||
if ( | ||
parsedFilePath.name.match(/Readme/i) | ||
&& fileNode.dir.match(/\/fields\/types\//) | ||
) { | ||
section = 'api/field'; // fake the path for slug consistency | ||
slug = `/${section}/${kebabify(parsedFilePath.dir)}`; | ||
} else { | ||
if (parsedFilePath.name === 'index') { | ||
slug = `/${kebabify(parsedFilePath.dir)}`; | ||
} else { | ||
slug = `/${kebabify(parsedFilePath.dir)}/${kebabify( | ||
parsedFilePath.name | ||
)}`; | ||
} | ||
} | ||
// If file isn't in subdirectory "dir" will be empty. | ||
slug = slug.replace('//', '/'); | ||
|
||
createNodeField({ node, name: 'slug', value: slug }); | ||
createNodeField({ node, name: 'section', value: section }); | ||
} | ||
}; | ||
|
||
exports.createPages = ( | ||
{ graphql, boundActionCreators } /* : NodeParams */ | ||
) /* : Promise<any> */ => { | ||
const { createPage } = boundActionCreators; | ||
|
||
return new Promise((resolve, reject) => { | ||
const articleComponent = path.resolve('templates/template-doc-layout.js'); | ||
resolve( | ||
graphql( | ||
` | ||
{ | ||
allMarkdownRemark(limit: 1000) { | ||
edges { | ||
node { | ||
fields { | ||
slug | ||
} } | ||
} | ||
} | ||
} | ||
` | ||
).then(result => { | ||
if (result.errors) { | ||
/* eslint-disable-next-line no-console */ | ||
console.log(result.errors); | ||
reject(result.errors); | ||
} | ||
|
||
result.data.allMarkdownRemark.edges.forEach(edge => { | ||
createPage({ | ||
path: edge.node.fields.slug, // required | ||
component: articleComponent, | ||
context: { | ||
slug: edge.node.fields.slug, | ||
}, | ||
}); | ||
}); | ||
}) | ||
); | ||
}); | ||
}; | ||
|
||
function kebabify (string) { | ||
return string | ||
.split('/') | ||
.map(s => kebabCase(s)) | ||
.join('/'); | ||
} |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"name": "gatsby-starter-default", | ||
"description": "Gatsby default starter", | ||
"version": "1.0.0", | ||
"author": "Kyle Mathews <[email protected]>", | ||
"dependencies": { | ||
"babel-preset-es2015": "^6.24.1", | ||
"babel-preset-react": "^6.24.1", | ||
"babel-preset-stage-0": "^6.24.1", | ||
"gatsby": "^1.9.247", | ||
"gatsby-link": "^1.6.40", | ||
"gatsby-plugin-glamor": "^1.6.13", | ||
"gatsby-plugin-react-helmet": "^2.0.10", | ||
"gatsby-source-filesystem": "^1.5.31", | ||
"gatsby-transformer-remark": "^1.7.40", | ||
"lodash.kebabcase": "^4.1.1", | ||
"react-document-title": "^2.0.3", | ||
"react-entypo": "^1.3.0", | ||
"react-helmet": "^5.2.0", | ||
"react-icons": "^2.2.7", | ||
"react-tweet-embed": "^1.1.0", | ||
"typeface-roboto": "^0.0.54", | ||
"typography": "^0.16.6", | ||
"typography-breakpoint-constants": "^0.15.10", | ||
"typography-plugin-code": "^0.16.11" | ||
}, | ||
"keywords": [ | ||
"gatsby" | ||
], | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "gatsby build", | ||
"develop": "gatsby develop", | ||
"format": "prettier --write 'src/**/*.js'", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"devDependencies": {} | ||
} |
4 changes: 2 additions & 2 deletions
4
www/layouts/components/Navbar.js → website/src/layouts/components/Navbar.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
www/pages/components/home/AdminInterface.js → ...c/pages/components/home/AdminInterface.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ages/components/home/CommunityResponse.js → ...ages/components/home/CommunityResponse.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
www/pages/components/home/Footer.js → website/src/pages/components/home/Footer.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
www/pages/components/home/ValueProps.js → ...e/src/pages/components/home/ValueProps.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
www/pages/components/home/ValueProps2.js → .../src/pages/components/home/ValueProps2.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
www/pages/components/home/WhereNext.js → ...te/src/pages/components/home/WhereNext.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 11 additions & 11 deletions
22
www/pages/components/home/header/Header.js → ...rc/pages/components/home/header/Header.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.