fix(docs, blog): Markdown link resolution does not support hot reload (#10185)

This commit is contained in:
Sébastien Lorber 2024-05-31 17:47:36 +02:00 committed by GitHub
parent 0eb7b64aac
commit a7afd9cc87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 93 additions and 44 deletions

View file

@ -45,14 +45,6 @@ export function truncate(fileString: string, truncateMarker: RegExp): string {
return fileString.split(truncateMarker, 1).shift()!;
}
export function getSourceToPermalink(blogPosts: BlogPost[]): {
[aliasedPath: string]: string;
} {
return Object.fromEntries(
blogPosts.map(({metadata: {source, permalink}}) => [source, permalink]),
);
}
export function paginateBlogPosts({
blogPosts,
basePageUrl,