feat: front matter in decks

This commit is contained in:
2026-03-13 10:50:08 +08:00
parent 1bd72bb58f
commit b2e10d847e
3 changed files with 9 additions and 2 deletions
+3
View File
@@ -67,6 +67,9 @@ export async function loadCSV<T = Record<string, string>>(path: string): Promise
const csvResult = result as CSV<T>;
if (frontmatter) {
csvResult.frontmatter = frontmatter;
for(const each of result){
Object.setPrototypeOf(each, frontmatter);
}
}
csvCache.set(path, result);