diff --git a/config.toml b/config.toml index 47383939..074a4e22 100644 --- a/config.toml +++ b/config.toml @@ -1,3 +1,11 @@ siteTitle="AlphabetJS" baseColor = "#884499" linkPrefix = "/gatsby-starter-documentation" +docPages = [ + "/docs/", + "/docs/getting-started/", + "/docs/how-to-run/", + "/docs/some-react-code/", + "/docs/the-next-step/", + "/docs/conclusion/", +] diff --git a/pages/docs/_pages.yaml b/pages/docs/_pages.yaml deleted file mode 100644 index 314b1120..00000000 --- a/pages/docs/_pages.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- "/docs/" -- "/docs/getting-started/" -- "/docs/how-to-run/" -- "/docs/some-react-code/" -- "/docs/the-next-step/" -- "/docs/conclusion/" diff --git a/pages/docs/_template.jsx b/pages/docs/_template.jsx index 8a2ebf75..006647fb 100644 --- a/pages/docs/_template.jsx +++ b/pages/docs/_template.jsx @@ -3,7 +3,7 @@ import { Link } from 'react-router' import { Breakpoint } from 'react-responsive-grid' import find from 'lodash/find' import { link } from 'gatsby-helpers' -import pageList from './_pages.yaml' +import { config } from 'config' import typography from 'utils/typography' const { rhythm } = typography @@ -22,7 +22,7 @@ module.exports = React.createClass({ }, render () { - const childPages = pageList.map((p) => { + const childPages = config.docPages.map((p) => { const page = find(this.props.route.pages, (_p) => _p.path === p) return { title: page.data.title,