From 158cf692bc5f7c404be9df6d0d75a04f4fdc020d Mon Sep 17 00:00:00 2001 From: Tyler Barnes Date: Wed, 7 Nov 2018 20:17:10 -0800 Subject: [PATCH] Update readme.md --- readme.md | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/readme.md b/readme.md index 3236242..bc6623d 100644 --- a/readme.md +++ b/readme.md @@ -331,33 +331,19 @@ Here's a very primitive diagram! ## Usage with `gatsby-plugin-layout` -The order of the two plugins makes a difference. +Since it was finicky / hard getting layouts to work properly with this plugin (and even with no errors, transitions weren't working), I've integrated the code from gatsby-plugin-layout into this plugin. -### If you want transitions to apply to your layout +Usage: -`gatsby-plugin-transition-link` should come after `gatsby-plugin-layout` in gatsby-config.js. - -```jsx -module.exports = { - plugins: [ - `gatsby-plugin-layout`, - `gatsby-plugin-transition-link` - ] -]; +```javascript + { + resolve: "gatsby-plugin-transition-link", + options: { + layout: require.resolve(`./src/components/Layout.jsx`) + } + } ``` -### If you don't want transitions to apply to your layout - -`gatsby-plugin-transition-link` should come before `gatsby-plugin-layout` in gatsby-config.js. - -```jsx -module.exports = { - plugins: [ - `gatsby-plugin-transition-link`, - `gatsby-plugin-layout` - ] -]; -``` ## 🌎🌏✌️❤️🐄