Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows slashes #140

Merged
merged 2 commits into from
Feb 24, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix path slashes on windows'
  • Loading branch information
NogsMPLS committed Feb 23, 2016
commit 80d6888894108c91a2ae8e25f1ace6620b0ba931
6 changes: 5 additions & 1 deletion lib/utils/glob-pages.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import glob from 'glob'
import path from 'path'
import parsePath from 'parse-filepath'
import slash from 'slash'
import fs from 'fs'
import frontMatter from 'front-matter'
import htmlFrontMatter from 'html-frontmatter'
Expand Down Expand Up @@ -29,7 +30,10 @@ module.exports = (directory, callback) => {
pageData.file.ext = ext = parsed.extname.slice(1)

// Determine require path
pageData.requirePath = path.relative(`${directory}/pages`, page)
pageData.requirePath = slash(path.relative(`${directory}/pages`, page))

// Make sure slashes on parsed.dirname are correct for Windows
parsed.dirname = slash(parsed.dirname)

// Load data for each file type.
let data
Expand Down