A slimmer Gatsby starter.
Get gatsby
:
npm install -g gatsby
Get started with this starter:
gatsby new my-simple-site gh:chbrown/gatsby-starter-zero
Go forth and develop!
cd my-simple-site
gatsby develop
When it's all ready:
gatsby build
.gitignore
: not required, but thegatsby
command isn't exactly tidy, so it's handy to have these defaults.config.toml
: bafflingly, this file's presence is required, but it doesn't have to contain anything.html.js
: should be calledLayout.jsx
or something but yeah, it's required, and has to have this filename.module.exports
must be set to an actualReact.Component
class (a stateless functional component won't cut it)
package.json
: required, butgatsby
the dependency transitively pulls inreact
andreact-dom
.pages/
: each file in here will be served as a distinct URL. E.g.,pages/admin.js
would be served as/admin/
README.md
: not required!site.css
: not required, but thegatsby build
will choke when inlining css without some css having been used.
rev=$(git rev-parse --short master)
repo=${TMPDIR-/tmp/}gatsby-starter-zero-gh-pages
git clone [email protected]:chbrown/gatsby-starter-zero.git -b gh-pages $repo
gatsby build && cp -R public/ $repo
cd $repo && git add . && git commit -m "Sync with master @ $rev" && git push
Check result at https://chbrown.github.io/gatsby-starter-zero/
Copyright © 2017 Christopher Brown. MIT Licensed.