feat: support yaml slug

This commit is contained in:
DIYgod
2023-07-22 14:59:55 +01:00
parent 06713c901e
commit dba68e1012
+3 -1
View File
@@ -41,7 +41,9 @@ export const readFiles = async (files: FileList) => {
pageContent.frontMatter.date || file.lastModified || Date.now(),
).toISOString(),
slug:
pageContent.frontMatter.permalink || getDefaultSlug(file.name),
pageContent.frontMatter.permalink ||
pageContent.frontMatter.slug ||
getDefaultSlug(file.name),
tags: makeArray(
pageContent.frontMatter.tags ||
pageContent.frontMatter.categories,