We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11f0367 commit 3f187f0Copy full SHA for 3f187f0
lib/commands/generate.js
@@ -36,15 +36,15 @@ function genSidebar(cwdPath, sidebarPath) {
36
let nodeName = ''
37
getDirFiles(cwdPath, function (pathname) {
38
path.relative(pathname, cwdPath)
39
- pathname = pathname.replace(cwdPath + '/', '')
+ pathname = pathname.replace(cwdPath + path.sep, '')
40
let filename = path.basename(pathname, '.md')
41
let splitPath = pathname.split(path.sep)
42
43
if (ignoreFiles.indexOf(filename) !== -1) {
44
return true
45
}
46
47
- nodeName = '- [' + toCamelCase(filename) + '](' + pathname + ')' + os.EOL
+ nodeName = '- [' + toCamelCase(filename) + '](' + pathname.replace(/\\/g, '/') + ')' + os.EOL
48
49
if (splitPath.length > 1) {
50
if (splitPath[0] !== lastPath) {
0 commit comments