Skip to content

Commit 71ec5ce

Browse files
committed
chore: pass full path in async glob
1 parent 09a553b commit 71ec5ce

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

modules/blog.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,7 @@ function resolveAuthors(authors: Author[], avatarMap: Map<string, string>): Reso
8888
* Resolves Bluesky avatars at build time.
8989
*/
9090
async function loadBlogPosts(blogDir: string, imagesDir: string): Promise<BlogPostFrontmatter[]> {
91-
const files = (await Array.fromAsync(glob('*.md', { cwd: blogDir }))).map(file =>
92-
join(blogDir, file),
93-
)
91+
const files = await Array.fromAsync(glob(join(blogDir, '*.md')))
9492

9593
// First pass: extract raw frontmatter and collect all Bluesky handles
9694
const rawPosts: Array<{ frontmatter: Record<string, unknown> }> = []

modules/standard-site-sync.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ export default defineNuxtModule({
5353
const possiblePublication = await checkPublication(handle, pdsPublicClient)
5454

5555
nuxt.hook('build:before', async () => {
56-
const files = (await Array.fromAsync(glob('**/*.md', { cwd: contentDir }))).map(file =>
57-
join(contentDir, file),
58-
)
56+
const files = await Array.fromAsync(glob(join(contentDir, '**/*.md')))
5957

6058
// INFO: Arbitrarily chosen concurrency limit, can be changed if needed
6159
const concurrencyLimit = 5

0 commit comments

Comments
 (0)