Demo: https://fabien0102-gatsby-starter.netlify.com/
Storybook: https://fabien0102-gatsby-starter.netlify.com/docs/
Gatsby 1.0 starter for generate awesome static website working with a nice env development.
This starter is currently in wip (see progression to #What's inside session).
Install this starter (assuming Gatsby is installed) by running from your CLI:
$ gatsby new my-website https://github.com/fabien0102/gatsby-starter
Run yarn start
(or press F5
if you are on VSCode) to hot-serve your website on http://localhost:8000.
Run yarn build
to create static site ready to host (/public
)
- Gatsby 1.0 (alpha)
- sharp
- offline support
- google analytics
- manifest
- typescript
- blog in markdown
- Best practices tools
- Jest / Enzyme
- Storybook
- Typescript / tslint
- xo linter
- Remark-lint
- Hunsky & lint-staged for autofix each commit
- Travis/AppVeyor config (unix-osx-windows CI)
- Code climate config
- SEO
- Semantic-ui for styling
- Lazyboy tools
- plop templates ->
yarn generate
- plop templates ->
.
├── data // website data (included into graphQL)
│ ├── author.json // list of blog authors
│ ├── avatars // authors avatars
│ └── blog // all blog data (posts, images)
├── gatsby-config.js // gatsby configuration
├── gatsby-node.js // gatsby node hooks
├── generators // generators (`yarn generate`)
│ ├── blog-post-generator.js // `blog post` generator
│ ├── component-generator.js // `component` generator
│ ├── page-generator.js // `page` generator
│ ├── plopfile.js // generators entry
│ ├── templates // all templates (handlebar notation)
│ └── utils.js // utils scripts for generators
├── package.json
├── public // output folder (in .gitignore)
├── README.md // this file
├── src // sources
│ ├── components // all react components
│ ├── css // styles
│ ├── declarations.d.ts // declarations for no typescript modules/files
│ ├── graphql-types.d.ts // graphql types (`yarn graphql-types`)
│ ├── html.tsx // main html (required)
│ ├── layouts // layouts
│ │ └── default.tsx // default layout (required)
│ ├── pages // all pages
│ └── templates // all templates (used for procedural page creation, see `gatsby-node.js`)
├── tools // miscs tools for dev
│ └── update-post-date.js // update post date hook
├── tsconfig.json // typescript configuration
├── tslint.json // tslint configuration
└── yarn.lock // yarn lock file
To avoid any boring copy/past, this starter-kit have many generators to permit simple bootstrap of current file pattern (eg. components/pages/blog posts).
You can add/delete/modify any generators into /generators
folder.
Be lazy and have fun!