diff options
-rw-r--r-- | lib/generate/site/index.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/generate/site/index.js b/lib/generate/site/index.js index f0a4780..4d8803e 100644 --- a/lib/generate/site/index.js +++ b/lib/generate/site/index.js @@ -154,7 +154,12 @@ Generator.prototype.convertFile = function(content, _input) { if (_output == "README.html") _output = "index.html"; var output = path.join(this.options.output, _output); var basePath = path.relative(path.dirname(output), this.options.output) || "."; - + + // Bug fix for issue #493 which would occur when relative-links are 2-level or more deep in win32 + if (process.platform === 'win32') { + basePath = basePath.replace(/\\/g, '/'); + } + return this.prepareFile(content, _input) .then(function(page) { // Index page in search |