Releases: gatsbyjs/gatsby
Support more markdown extensions
JS Frontmatter!
@jbolda fixed the 2nd issue ever filed for Gatsby! Supporting "frontmatter" in javascript files. This should still be considered experimental but you can now export an object from your JS pages and that data will be available in your templates, other pages, etc.
I added a quick example of how this works on the starter blog
- http://gatsbyjs.github.io/gatsby-starter-blog/2016-12-9-react-component-post/
- gatsbyjs/gatsby-starter-blog@e333cb1
Note that this initial release is still fairly limited at the moment. This only works in js/jsx files and you must export your data using commonjs (e.g. exports.data = {}
). Also we only parse data layer one level deep so
this works:
exports.data = {
title: "My sweet title",
}
this still does not work:
exports.data = {
title: "My sweet title",
goingDeeper: {
word: "to your mother",
}
}
PRs welcome to make this work on es6 exports (export const data
) as well as for subobjects!
Typescript support 🎉
@rothfels added Typescript support! #578
To give it a go, checkout his starter project at https://github.com/rothfels/gatsby-starter-typescript.
Recently launched sites
UX improvements and support .yml files
- We tell people Gatsby sites work w/o Javascript and then people fire up a development server w/o javascript... and see a blank screen. The development server actually does need javascript to power hot-reloading, etc. @nason add a default
<noscript />
message for people who've turned off Javascript to tell them what's happening and how to test their site w/ no javascript (gatsby build; gatsby serve-build
) #566 - @vinnymac borrowed a nice recent addition to create-react-app where they're not just telling you that your desired port is taken but also which process is (probably) using it #579
~ - @briancappello added support for the
.yml
file extension (a less common variant file extension for YAML files). #580
Thanks everyone!
1.0.0-alpha10
Added
- Did the intitial build of the new gatsbyjs.org! It's in the
www
subdirectory on the 1.0 branch and is built on each push! That's my
kind of integration testing 😎 You can see the early version of the
site at https://gatsbyjs.netlify.com/. - Added
<link preload>
for page JS bundles. This speeds up loading scripts
slightly by telling the browser to start downloading the scripts when
the HTML first starts being parsed instead of when the browser reaches
the end. This is especially helpful for large HTML documents on slow
mobile networks. PR
Changed
- Use namedmodulesplugin instead of recordsPath for ensuring
deterministic builds and long-term cachability. The previous PR adding
support for recordsPath
proved unpleasant as you had to build locally and commit the outputted
records.json which was confusing and annoying.
PR - Replaced the
scripts
prop that was passed into the body with apostBodyComponents
prop that mirrors theheaderComponents
prop. This is more flexible as it'll let sites/plugins to do things like pass in analytics snippets, etc. easily.
1.0.0-alpha9
1.0.0-alpha8
Prepping to launch first big website on Gatsby 1.0.0! Knocking out some remaining bugs.
Added
- Extension API
swOnUpdated
for when a service worker finishes
updating. Use this to alert users of your app to reload to see the
latest version.
commit
Fixed
- hot reloading now fully works. Apparently you can't use function
components for top-level routes on react-router with react-hot-loader
3.0¯\_(ツ)_/¯
#532 and
commit - Webpack needs the help of an obscure setting
recordsPath
to preserve
module ids across builds. Big thanks to @NekR, @bebraw, and @TheLarkInn for helping me with this. Previous to this change, loading changed JS chunks could cause a JS
error as the module ids the new chunk expects wouldn't match the module
ids from the older chunks.
#533
Changed
- Disabled hard-source-webpack-plugin. It speeds up builds significantly
but has been causing hard-to-debug errors while developing. We'll
circle back to it down the road.
commit - Restored using ChunkManifestPlugin. It was disabled while trying to
debug the mismatched module id bug but that being fixed, we're using
it again.
commit - Name modules ids in development for easier debugging. Primary benefit
is you can see which modules are getting hot reloaded.
commit
1.0.0-alpha7
Fixed
- Removed entries from the webpack config looking for
node_modules/gatsby/node_modules
. This was added to help when
developing Gatsby usingnpm link
but when Gatsby is installed
regularly, it then fails the Webpack validation as
node_modules/gatsby/node_modules
doesn't now exist.
1.0.0-alpha6
A bug fixin' we go
Some nice bug fixes of some long-standing annoyances by @mojodna and @TheAncientGoat
- @mojodna finally got Webpack's
publicPath
working across all the build steps and adds thelinkPrefix
as needed #502. Fixed #392 and #473 - @TheAncientGoat noticed that Firebase was failing during a server render and traced it to Firebase (and certain other isomorphic packages) using different packages on the server and in the browser and fixed the Webpack config for this in #512
- @KyleAMathews back-ported some Webpack config from his 1.0 work to add file/url loader support for more file types.