Skip to content

Commit 58ab8a5

Browse files
committed
Use config.partials
1 parent b3d8948 commit 58ab8a5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,14 @@ const audioFile = path.resolve(dstDir, 'audio.ogg');
6060
const indexFile = path.resolve(dstDir, 'index.html');
6161
const minutesDir = path.join(dstDir, '/..');
6262

63+
const partialsDir = ('partials' in config)
64+
? path.join(base_dir, config.partials)
65+
: path.join(base_dir, 'www/_partials/');
66+
6367
var htmlHeader = fs.readFileSync(
64-
path.join(base_dir, 'www/_partials/header.html'), {encoding: 'utf8'});
68+
path.join(partialsDir, 'header.html'), {encoding: 'utf8'});
6569
var htmlFooter = fs.readFileSync(
66-
path.join(base_dir, 'www/_partials/footer.html'), {encoding: 'utf8'});
70+
path.join(partialsDir, 'footer.html'), {encoding: 'utf8'});
6771
var peopleJson = fs.readFileSync(
6872
path.join(base_dir, 'www/people.json'), {encoding: 'utf8'});
6973
var gLogData = '';

0 commit comments

Comments
 (0)