Fixed delete statement. Added linebreaks to output file.
This commit is contained in:
parent
fb5e5f11bb
commit
2af4db9bd0
@ -16,8 +16,8 @@ function url(title) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (fs.existsSync(inputDirectory)) {
|
if (fs.existsSync(inputDirectory)) {
|
||||||
logger.info(`Purging input directory: ${outputDirectory}`);
|
logger.info(`Purging input directory: ${inputDirectory}`);
|
||||||
del.sync(outputDirectory, {force: true});
|
del.sync(inputDirectory, {force: true});
|
||||||
}
|
}
|
||||||
|
|
||||||
exec('git clone https://github.com/citra-emu/citra.wiki.git');
|
exec('git clone https://github.com/citra-emu/citra.wiki.git');
|
||||||
@ -74,7 +74,7 @@ fs.readdir(inputDirectory, function(err, items) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Create the new markdown header for Hugo.
|
// Create the new markdown header for Hugo.
|
||||||
let newFileContents = `+++\ntitle = "${title}"\ndate = "${modified.toISOString()}"\n+++\n${cleanData}`;
|
let newFileContents = `+++\r\ntitle = "${title}"\r\ndate = "${modified.toISOString()}"\r\n+++\r\n\r\n${cleanData}\r\n`;
|
||||||
|
|
||||||
let itemOutput = item.toLowerCase();
|
let itemOutput = item.toLowerCase();
|
||||||
fs.writeFile(`${outputDirectory}${itemOutput}`, newFileContents, function(err) {
|
fs.writeFile(`${outputDirectory}${itemOutput}`, newFileContents, function(err) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user