diff --git a/example/Photo 1-lobby_FS.jpg b/example/Photo 1-lobby_FS.jpg new file mode 100644 index 00000000..6d296731 Binary files /dev/null and b/example/Photo 1-lobby_FS.jpg differ diff --git a/example/index.html b/example/index.html index e7a96279..0779ff47 100644 --- a/example/index.html +++ b/example/index.html @@ -12,6 +12,9 @@ _posts: { "2015-02-14-this-is-a-post.md": { content: "---\ntitle: This is a YAML front matter post\nimage: /nf-logo.png\ndate: 2015-02-14T00:00:00.000Z\n---\n\n# I Am a Title in Markdown\n\nHello, world\n\n* One Thing\n* Another Thing\n* A Third Thing\n" + }, + "2015-02-14-this-is-test-post.md": { + content: "---\ntitle: This is a test post\nimage: /Photo 1-lobby_FS.jpg\ndate: 2015-02-14T00:00:00.000Z\n---\n\n# I Am a Title in Markdown\n\nHello, world\n\n* One Thing\n* Another Thing\n* A Third Thing\n" }, "2015-02-15-this-is-a-json-frontmatter-post.md": { content: "{\n\"title\": \"This is a JSON front matter post\",\n\"image\": \"/nf-logo.png\",\n\"date\": \"2015-02-15T00:00:00.000Z\"\n}\n\n# I Am a Title in Markdown\n\nHello, world\n\n* One Thing\n* Another Thing\n* A Third Thing\n" diff --git a/src/lib/pathHelper.js b/src/lib/pathHelper.js index 4748122e..48d2a308 100644 --- a/src/lib/pathHelper.js +++ b/src/lib/pathHelper.js @@ -1,5 +1,5 @@ const absolutePath = new RegExp('^(?:[a-z]+:)?//', 'i'); -const normalizePath = path => path.replace(/[\\\/]+/g, '/'); +const normalizePath = path => path.replace(/[\\\/]+/g, '/').replace(/[\s]+/g, '%20'); export function resolvePath(path, basePath) { // eslint-disable-line // No path provided, skip