Skip to content

Commit

Permalink
fix: Add title to HTML output
Browse files Browse the repository at this point in the history
  • Loading branch information
joscha committed Sep 29, 2016
1 parent ebcc537 commit 686b5bf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ module.exports = (dir, fileTypes = null, isHtml = false) => {

const archyTree = dirTreeToArchyTree(tree, dir, isHtml);
const outTree = archy(archyTree);
return isHtml ? wrapHtml(outTree) : outTree;
return isHtml ? wrapHtml(outTree, tree.name) : outTree;
}
1 change: 1 addition & 0 deletions test/fixtures/1.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<html>
<head>
<meta charset="UTF-8">
<title>1</title>
<style>
* {
font-family: monospace;
Expand Down
3 changes: 2 additions & 1 deletion wrapHtml.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module.exports = (content) => `<!doctype html>
module.exports = (content, title) => `<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>${title}</title>
<style>
* {
font-family: monospace;
Expand Down

0 comments on commit 686b5bf

Please sign in to comment.