mirror of
https://github.com/yuzu-emu/shared-hugo-scripts.git
synced 2024-11-23 16:15:39 +01:00
Left Sidebar. Wiki_markdown default empty string.
This commit is contained in:
parent
4c513ca8c9
commit
c703b70948
@ -36,10 +36,6 @@ function gitPull(directory, repository) {
|
||||
}
|
||||
}
|
||||
|
||||
async function getDirectories(x) {
|
||||
return fs.readdir(x).filter(file => fs.lstatSync(path.join(x, file)).isDirectory())
|
||||
}
|
||||
|
||||
async function run() {
|
||||
// Make sure the output directories in Hugo exist.
|
||||
[fsPathHugoContent, fsPathHugoBoxart, fsPathHugoIcon, fsPathHugoSavefiles, fsPathHugoScreenshots].forEach(function (path) {
|
||||
@ -122,11 +118,11 @@ async function run() {
|
||||
}
|
||||
|
||||
// Clear out the wiki markdown so it won't be stored with the metadata.
|
||||
let wikiText = x.wiki_markdown
|
||||
let wikiText = x.wiki_markdown || ''
|
||||
x.wiki_markdown = null
|
||||
|
||||
let meta = tomlify.toToml(x, {space: 2})
|
||||
let contentOutput = `+++\r\n${meta}\r\n+++\r\n\r\n${wikiText}\r\n`;
|
||||
let contentOutput = `+++\r\nleft_sidebar = true\r\n${meta}\r\n+++\r\n\r\n${wikiText}\r\n`;
|
||||
|
||||
await fs.writeFile(`${fsPathHugoContent}/${x.id}.md`, contentOutput);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user