Skip to content

Commit

Permalink
Merge pull request #15 from thedevdojo/latestUpdates
Browse files Browse the repository at this point in the history
Updated html build and adding tables
  • Loading branch information
tnylea authored Feb 27, 2024
2 parents b54f8d7 + 8a3b40f commit 300d1af
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions src/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/')))

Expand Down
1 change: 1 addition & 0 deletions src/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 300d1af

Please sign in to comment.