diff --git a/gulpfile.js b/gulpfile.js index 936adef..a3fe47c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -18,13 +18,12 @@ async function listDir(directoryPath) { } const dir = import.meta.dirname -const pages = await listDir('./src/pages') async function html() { - console.log(`resync...`) + const pages = await listDir('./src/pages') + pages.forEach(page=>{ if(existsSync(`${dir}/src/pages/${page}/${page}.html`)){ - console.log(`we find page ${page}!`) return src([`./src/pages/${page}/${page}.html`]) .pipe(fileinclude({ prefix: '@@', diff --git a/src/pages/example/example.html b/src/pages/example/example.html new file mode 100644 index 0000000..6a0fe18 --- /dev/null +++ b/src/pages/example/example.html @@ -0,0 +1,11 @@ + + + + + + Example page + + + + + \ No newline at end of file diff --git a/src/pages/page2/page2.html b/src/pages/page2/page2.html new file mode 100644 index 0000000..e69de29