Releases: gatsbyjs/gatsby
Add support for JSON/YAML/TOML files + option to disable bundle.js for production build
- @KyleAMathews added support for creating pages from JSON/YAML/TOML files. This can be incredibly useful if you're integrating Gatsby with a 3rd-party system. Write out the data as JSON files and they'll be auto-converted into Gatsby pages. YAML & TOML are very handy for maintaining complex data for a page by hand.
- @scottnonnenberg added an option to disable building a
bundle.jsfor production. This is helpful to minimize the amount of data people download for your site and for very large sites (e.g. 1000+ pages), not compiling the JS can save a considerable amount of time.
Small dev improvements
- @scottnonnenberg added code to catch and throw errors while compiling the
html.jsfile during dev #176 - @tleunen suggested that when an unknown subcommand is run to show the help. Fixed in 938d9f0
Add support for a 404 page
Small fixes — improve default host on Windows + compile mode for html.js
- @jquense changed the default host on Windows to
localhost6543ece - @KyleAMathews changed the compilation mode for the
html.jsfile to development. f9ae585
Better Windows support & Font Loaders
Noted fixer of NPM packages for Windows @NogsMPLS submitted a PR to get Gatsby (hopefully) completely working on Windows! 🎉 🎉 🎉
@gesposito added support to Webpack for requiring fonts #162
@KyleAMathews made a few miscallaneous changes
- Replace remaining uses of Underscore with Lodash 486bd29
- Integrate the
scroll-behaviorpackage so clicking between links with react-router is more browser-like b4122db - Add
parentTemplateFileto routes for use in theming 8620488
Thanks everyone!
Major release upgrading to React-Router 2.0 + full support for Less/Sass/PostCSS
Hi folks,
Finished off a major new release of Gatsby in time for ReactConf 🎉
New features
- Support Less/Sass/Postcss out of the box. CSS files are processed using the excellent cssnext.
- Support extracting and minifying css on production builds to an external
styles.cssfile. - React-Router 2.0 🎉
Internals work
- We're using Webpack Hot Middleware + react-transform-hmr now instead of react-hot-loader.
- All remaining Coffeescript files have been converted to JS.
Breaking changes.
React Router has made two major releases since Gatsby was first built with a ton of nice improvements. But as Gatsby uses React Router heavily, its breaking changes often cause breaking changes within Gatsby.
The main change is what props are passed to _template and wrapper components. Previously each component was passed the current page data and a pages array of all pages. Now this information is put onto the route prop passed in by React Router.
Also where previously React Router provided a <RouteHandler/> component which rendered the children components in _template files, you should now replace those with {this.props.children}.
Upgrading
- Install new packages:
npm install --save react-router@latest lodash@latest&&npm install --save-dev babel-plugin-react-transform@1.1.1 react-transform-catch-errors react-transform-hmr redbox-react - Adjust templates and wrappers (and other components as necessary) to account for the React Router changes.
onRouteChangeis now passed thelocationobject from History.
Internals cleanup
- @KyleAMathews added an .eslintrc config to keep our code tidy and consistent.
- @fson fixed both some problems with NPM 3 installs as well as made builds throw errors so automated builds will fail properly.
- @ChristopherBiscardi added integration with the debug module to give you insight into what Gatsby is doing.
> DEBUG=gatsby:* gatsby build
Can now easily override default Webpack config
@ChristopherBiscardi added a PR to make it simple to override or extend the default Gatsby Webpack configuration. Gatsby tries to anticipate most needs out of the box but many projects will need some customizations to Webpack.
See the PR and new documentation.
Now using React 0.14!
Update to React 0.14
The big change for this release was updating React to 0.14. Thanks to @patrykkopycinski for his PR!
We're still on the 0.13 series of React Router as their recent 1.0 release will require internal updates to Gatsby. Follow along at #32 if interested.
gatsby serve now gatsby develop
Serve implied Gatsby was just serving up files. Develop conveys the idea better that you're starting up a full-fledged development server with the intent to start developing.
Can now do webpack requires in your html.jsx
Previously you couldn't do webpack requires in your html component as the development server was requiring the module in node context. But with the help of @petehunt's webpack-require project, you can now require css or anything else you'd like in your html.jsx.
Improved support for prefixing site links e.g. when building for Github Pages.
See the documentation that's been added to the README.
How to upgrade
You'll need to update React in your project to React 0.14 as well as upgrade any React components that relied on older React APIs. Make sure to not install the latest react-router.
