File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ const isPug = (filename) => {
43
43
}
44
44
45
45
const compile = ( filename , basedir ) => {
46
- const levels = filename . replace ( ' pug/ views/' , '' ) . replace ( ' pug/ pages/' , '' ) . split ( '/' ) . length
46
+ const levels = filename . replace ( ` pug${ path . sep } views${ path . sep } ` , '' ) . replace ( ` pug${ path . sep } pages${ path . sep } ` , '' ) . split ( ` ${ path . sep } ` ) . length
47
47
const base = ( levels ) => {
48
48
let path = './'
49
49
while ( levels > 1 ) {
@@ -103,7 +103,7 @@ const compileHtml = () => {
103
103
pages . forEach ( ( page ) => {
104
104
if ( isPug ( page ) ) {
105
105
const html = compile ( page , './pug/layout/' )
106
- const file = page . replace ( ' pug/ pages/' , '' ) . replace ( '.pug' , '.html' )
106
+ const file = page . replace ( ` pug${ path . sep } pages${ path . sep } ` , '' ) . replace ( '.pug' , '.html' )
107
107
// Create tree
108
108
mkdirp . sync ( resolve ( dest , dirname ( file ) ) )
109
109
// Create HTML file
You can’t perform that action at this time.
0 commit comments