Skip to content

Commit 910e026

Browse files
add fullPath to PostContent
1 parent 6ff1968 commit 910e026

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib/posts.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export type PostContent = {
1010
readonly title: string;
1111
readonly slug: string;
1212
readonly tags?: string[];
13+
readonly fullPath: string;
1314
};
1415

1516
let postCache: PostContent[];
@@ -38,7 +39,10 @@ function fetchPostContent(): PostContent[] {
3839
title: string;
3940
tags: string[];
4041
slug: string;
42+
fullPath: string,
4143
};
44+
matterData.fullPath = fullPath;
45+
4246
const slug = fileName.replace(/\.mdx$/, "");
4347

4448
// Validate slug string

0 commit comments

Comments
 (0)