Skip to content

Commit d6556f1

Browse files
committed
Improved template selection (now case insensitive).
1 parent 938be45 commit d6556f1

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

lib/doxdox.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ exports.parseInput = function (input, output, config) {
5353
exports.parseScripts = function (scripts, output, config) {
5454

5555
var files = [],
56-
content;
56+
content,
57+
template;
5758

5859
scripts.forEach(function (script) {
5960

@@ -72,13 +73,17 @@ exports.parseScripts = function (scripts, output, config) {
7273

7374
if (fs.existsSync(path.resolve(config.layout))) {
7475

75-
templates[config.layout] = require(path.resolve(config.layout));
76+
template = require(path.resolve(config.layout));
77+
78+
} else if (templates[config.layout.toLowerCase()]) {
79+
80+
template = templates[config.layout.toLowerCase()];
7681

7782
}
7883

79-
if (templates[config.layout]) {
84+
if (template) {
8085

81-
content = templates[config.layout]({
86+
content = template({
8287
title: config.title,
8388
description: config.description,
8489
files: files

0 commit comments

Comments
 (0)