Skip to content

Commit

Permalink
Tweak messaging some + add link to PR
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleAMathews committed Apr 9, 2016
1 parent cbb9d1a commit 2856acc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/utils/glob-pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ module.exports = (directory, callback) => {
if (data.path) {
// Path was hardcoded.
const pathInvariantMessage = `
You're setting path to ${data.path} for ${parsed.dirname},
but it should be /${data.path}
Paths must be prepended with a forward slash. You set the path to
"${data.path}" in "${parsed.path}" but instead it should be "/${data.path}"
See http://bit.ly/1qeNpdy for more.
`
invariant((data.path.charAt(0) === '/'), pathInvariantMessage)
pageData.path = data.path
Expand Down

0 comments on commit 2856acc

Please sign in to comment.