diff --git a/src/build.js b/src/build.js index f573b8c..f5f1d81 100644 --- a/src/build.js +++ b/src/build.js @@ -93,6 +93,9 @@ function buildFile(filePath, buildDir, url){ filePath = path.join(folderPath, 'index.html'); } else { filePath = path.join(buildDir, path.basename(filePath)); + if(filePath.endsWith('index.md')){ + filePath = filePath.replace('index.md', 'index.html'); + } } } else { // Processing for Pages diff --git a/src/dev.js b/src/dev.js index 30b8ba0..c2a1dac 100644 --- a/src/dev.js +++ b/src/dev.js @@ -47,8 +47,22 @@ module.exports = { }, 100); }); + // TODO: Allow user to specify setting headers in the dev server via a config file + // app.use(function(req, res, next) { + // res.setHeader("Cross-Origin-Opener-Policy", "same-origin"); + // res.setHeader("Cross-Origin-Embedder-Policy", "require-corp"); + // next(); + // }); + app.use(connectLiveReload(liveReloadOptions)); + // let options = { + // setHeaders: function (res, path, stat) { + // res.set("Cross-Origin-Opener-Policy", "same-origin"); + // res.set("Cross-Origin-Embedder-Policy", "require-corp"); + // } + // } + app.use('/assets', express.static(path.join(currentDirectory, '_site/assets'))) app.use('/', express.static(path.join(currentDirectory, 'public/'))) diff --git a/src/parser.js b/src/parser.js index 6dfe7d8..6085aee 100644 --- a/src/parser.js +++ b/src/parser.js @@ -48,6 +48,7 @@ module.exports = { let page = this.processFile(pagePath, build, url); showdown.setOption('ghCompatibleHeaderId', true); + showdown.setOption('tables', true); converter = new showdown.Converter(); let tableOfContents = toc(content);