mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-26 06:14:06 -06:00
Update quartz/plugins/transformers/frontmatter.ts
Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
This commit is contained in:
parent
37e7e67518
commit
619941ea23
@ -115,9 +115,8 @@ export const FrontMatter: QuartzTransformerPlugin<Partial<Options>> = (userOpts)
|
|||||||
if (socialImage) data.socialImage = socialImage
|
if (socialImage) data.socialImage = socialImage
|
||||||
|
|
||||||
// Remove duplicate slugs
|
// Remove duplicate slugs
|
||||||
const uniqueSlugs = [...new Set(allSlugs)]
|
const uniqueSlugs = [...new Set(allSlugs)];
|
||||||
allSlugs.length = 0
|
allSlugs.splice(0, allSlugs.length, ...uniqueSlugs);
|
||||||
uniqueSlugs.forEach((slug) => allSlugs.push(slug))
|
|
||||||
|
|
||||||
// fill in frontmatter
|
// fill in frontmatter
|
||||||
file.data.frontmatter = data as QuartzPluginData["frontmatter"]
|
file.data.frontmatter = data as QuartzPluginData["frontmatter"]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user