Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions modules/blog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ import {
type BlogPostFrontmatter,
type ResolvedAuthor,
} from '../shared/schemas/blog'
import { globSync } from 'tinyglobby'
import { isProduction } from '../config/env'
import { BLUESKY_API } from '../shared/utils/constants'
import { mkdir, writeFile } from 'node:fs/promises'
import { glob, mkdir, writeFile } from 'node:fs/promises'
import { existsSync } from 'node:fs'
import crypto from 'node:crypto'

Expand Down Expand Up @@ -89,7 +88,7 @@ function resolveAuthors(authors: Author[], avatarMap: Map<string, string>): Reso
* Resolves Bluesky avatars at build time.
*/
async function loadBlogPosts(blogDir: string, imagesDir: string): Promise<BlogPostFrontmatter[]> {
const files: string[] = globSync(join(blogDir, '*.md').replace(/\\/g, '/'))
const files = await Array.fromAsync(glob(join(blogDir, '*.md').replace(/\\/g, '/')))

// First pass: extract raw frontmatter and collect all Bluesky handles
const rawPosts: Array<{ frontmatter: Record<string, unknown> }> = []
Expand Down
5 changes: 3 additions & 2 deletions modules/standard-site-sync.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import process from 'node:process'
import { createHash } from 'node:crypto'
import { glob } from 'node:fs/promises'
import { join } from 'node:path'
import { defineNuxtModule, useNuxt, createResolver } from 'nuxt/kit'
import { safeParse } from 'valibot'
import { BlogPostSchema, type BlogPostFrontmatter } from '#shared/schemas/blog'
Expand Down Expand Up @@ -51,8 +53,7 @@ export default defineNuxtModule({
const possiblePublication = await checkPublication(handle, pdsPublicClient)

nuxt.hook('build:before', async () => {
const { glob } = await import('tinyglobby')
const files: string[] = await glob(`${contentDir}/**/*.md`)
const files = await Array.fromAsync(glob(join(contentDir, '**/*.md')))

// INFO: Arbitrarily chosen concurrency limit, can be changed if needed
const concurrencyLimit = 5
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@
"simple-git": "3.33.0",
"spdx-license-list": "6.11.0",
"std-env": "4.0.0",
"tinyglobby": "0.2.15",
"ufo": "1.6.3",
"unocss": "66.6.7",
"unplugin-vue-router": "0.19.2",
Expand Down
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading