mirror of
https://github.com/GenderDysphoria/GenderDysphoria.fyi.git
synced 2025-01-30 23:06:18 +00:00
Fix new-post glitch
This commit is contained in:
parent
715634a8b9
commit
f18b07fa41
@ -19,7 +19,7 @@ module.exports = exports = async function newPost () {
|
||||
}
|
||||
|
||||
// console.log(date);return;
|
||||
var id = random.id(6).toUpperCase();
|
||||
var id = random.id(10).toUpperCase();
|
||||
var fname = format(date, 'yyyy-MM-dd.HHmm.') + id;
|
||||
|
||||
var target = resolve('posts', fname);
|
||||
@ -29,7 +29,7 @@ module.exports = exports = async function newPost () {
|
||||
target += '.md';
|
||||
} else {
|
||||
await fs.ensureDir(target);
|
||||
target += path.join(target, 'index.md');
|
||||
target = path.join(target, 'index.md');
|
||||
}
|
||||
|
||||
await fs.writeFile(target, contents);
|
||||
|
Loading…
x
Reference in New Issue
Block a user