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) {