Skip to content

Commit

Permalink
Fix up template listing stuff (closes #200)
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Jun 14, 2018
1 parent 3cbae57 commit 259d9f0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function parseOptions(options) {
options.templateSlides = fs.readFileSync(options.template).toString();
}
if (options.listingTemplate && options.listingTemplate !== defaults.listingTemplate) {
options.templateListing = fs.readFileSync(options.listingTemplate).toString();
options.templateListing = () => fs.readFileSync(options.listingTemplate).toString();
}
if (options.revealOptions) {
options.revealOptionsStr = JSON.stringify(options.revealOptions);
Expand Down
2 changes: 1 addition & 1 deletion lib/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function renderMarkdownFileListing(req, res) {
const options = getOptions();
const list = glob
.sync('**/*.md', {
cwd: options.initialDir,
cwd: options.initialPath,
ignore: 'node_modules/**'
})
.map(filePath => `<a href="${filePath}">${filePath}</a>`);
Expand Down
2 changes: 1 addition & 1 deletion lib/template/listing.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>Directory Listing</title>
<link rel="stylesheet" href="{{{themeUrl}}}" id="theme">
<link rel="stylesheet" href="/{{{themeUrl}}}" id="theme">
<style type="text/css">
body {
margin: 1em;
Expand Down

0 comments on commit 259d9f0

Please sign in to comment.