Skip to content
This repository has been archived by the owner on Oct 25, 2018. It is now read-only.

Commit

Permalink
Centralize config in the config.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleAMathews committed Mar 16, 2016
1 parent b70dae1 commit 637ec3e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
8 changes: 8 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
@@ -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/",
]
6 changes: 0 additions & 6 deletions pages/docs/_pages.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions pages/docs/_template.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down

0 comments on commit 637ec3e

Please sign in to comment.