From bb92447ce73f4f6de90f8dc56e7ba19b0f95c379 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 8 Nov 2018 14:53:46 +0100 Subject: [PATCH] move data folder to root --- {src/data => data}/sections.yml | 0 {src/data => data}/sidebars/concepts.yml | 0 {src/data => data}/sidebars/setup.yml | 0 {src/data => data}/sidebars/tutorials.yml | 0 gatsby-config.js | 2 +- src/components/Sidebar.jsx | 2 +- 6 files changed, 2 insertions(+), 2 deletions(-) rename {src/data => data}/sections.yml (100%) rename {src/data => data}/sidebars/concepts.yml (100%) rename {src/data => data}/sidebars/setup.yml (100%) rename {src/data => data}/sidebars/tutorials.yml (100%) diff --git a/src/data/sections.yml b/data/sections.yml similarity index 100% rename from src/data/sections.yml rename to data/sections.yml diff --git a/src/data/sidebars/concepts.yml b/data/sidebars/concepts.yml similarity index 100% rename from src/data/sidebars/concepts.yml rename to data/sidebars/concepts.yml diff --git a/src/data/sidebars/setup.yml b/data/sidebars/setup.yml similarity index 100% rename from src/data/sidebars/setup.yml rename to data/sidebars/setup.yml diff --git a/src/data/sidebars/tutorials.yml b/data/sidebars/tutorials.yml similarity index 100% rename from src/data/sidebars/tutorials.yml rename to data/sidebars/tutorials.yml diff --git a/gatsby-config.js b/gatsby-config.js index 2c2e0255..dc430942 100755 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -23,7 +23,7 @@ module.exports = { resolve: 'gatsby-source-filesystem', options: { name: 'data', - path: `${__dirname}/src/data` + path: `${__dirname}/data` } }, { diff --git a/src/components/Sidebar.jsx b/src/components/Sidebar.jsx index c7677c05..f5a858be 100644 --- a/src/components/Sidebar.jsx +++ b/src/components/Sidebar.jsx @@ -55,7 +55,7 @@ export default class Sidebar extends Component { const { sidebar, location } = this.props const sidebarfile = sidebar - ? require(`../data/sidebars/${sidebar}.yml`) // eslint-disable-line + ? require(`../../data/sidebars/${sidebar}.yml`) // eslint-disable-line : [] if (!sidebarfile) {