Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ All templates, css, and content are *hot reloadable*.
* [nordnet.se/brand](https://www.nordnet.se/brand/)
* [likescoffee.com](http://likescoffee.com/) ([source](https://github.com/pamo/pamo.github.io/tree/development))
* [vii.campjs.com](http://vii.campjs.com/) ([source](https://github.com/campjs/campjs-vii))
* [michaeljdeeb.com](http://michaeljdeeb.com) ([source](https://github.com/michaeljdeeb/michaeljdeeb-gatsby-blog))
* [Edit this file to add yours!](https://github.com/gatsbyjs/gatsby/blob/master/README.md)

### Why use Gatsby instead of other Static Site Generators
Expand Down
6 changes: 6 additions & 0 deletions lib/utils/glob-pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import fs from 'fs'
import frontMatter from 'front-matter'
import htmlFrontMatter from 'html-frontmatter'
import objectAssign from 'object-assign'
import invariant from 'invariant'
const debug = require('debug')('gatsby:glob')
let rewritePath
try {
Expand Down Expand Up @@ -76,6 +77,11 @@ module.exports = (directory, callback) => {
if (!(parsed.name.slice(0, 1) === '_')) {
if (data.path) {
// Path was hardcoded.
const pathInvariantMessage = `
You're setting path to ${data.path} for ${parsed.dirname},
but it should be /${data.path}
`
invariant((data.path.charAt(0) === '/'), pathInvariantMessage)
pageData.path = data.path
} else if (rewritePath) {
pageData.path = rewritePath(parsed, pageData)
Expand Down