6.2
This commit is contained in:
1 parent
5b4c086c73
commit
db87655c87
58 files changed
+3184
-2128
No files matched your search
@@ -164,7 +164,7 @@ export function createPost(frontMatter: PostFrontMatter, content: string): strin
|
||||
const dirName = `${dateStr}-${titlePart}`;
|
||||
const dirPath = path.join(CONTENT_DIR, year, dirName);
|
||||
|
||||
if (fs.existsSync(dirPath)) {
|
||||
if (fs.existsSync(path.join(dirPath, "index.md"))) {
|
||||
throw new Error(`Post already exists at ${dirPath}`);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user