import { fileURLToPath } from 'node:url' import { dirname } from 'node:path' import Metalsmith from 'metalsmith' import collections from '@metalsmith/collections' import layouts from '@metalsmith/layouts' import markdown from '@metalsmith/markdown' import permalinks from '@metalsmith/permalinks' import drafts from '@metalsmith/drafts' const __dirname = dirname(fileURLToPath(import.meta.url)) const