mirror of
https://github.com/yuzu-emu/shared-hugo-scripts
synced 2024-11-25 07:38:52 +00:00
Left Sidebar. Wiki_markdown default empty string.
This commit is contained in:
parent
4c513ca8c9
commit
c703b70948
1 changed files with 2 additions and 6 deletions
|
@ -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() {
|
async function run() {
|
||||||
// Make sure the output directories in Hugo exist.
|
// Make sure the output directories in Hugo exist.
|
||||||
[fsPathHugoContent, fsPathHugoBoxart, fsPathHugoIcon, fsPathHugoSavefiles, fsPathHugoScreenshots].forEach(function (path) {
|
[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.
|
// 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
|
x.wiki_markdown = null
|
||||||
|
|
||||||
let meta = tomlify.toToml(x, {space: 2})
|
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);
|
await fs.writeFile(`${fsPathHugoContent}/${x.id}.md`, contentOutput);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue