(absoluteUrl)
| 77 | const docsLastmod = buildDocsLastmodMap(); |
| 78 | |
| 79 | function lastmodForUrl(absoluteUrl) { |
| 80 | try { |
| 81 | const { pathname } = new URL(absoluteUrl); |
| 82 | const slug = pathname.replace(/^\/|\/$/g, "") || "index"; |
| 83 | for (const ext of ["mdx", "md"]) { |
| 84 | const candidate = `src/content/docs/${slug}.${ext}`; |
| 85 | if (docsLastmod.has(candidate)) { |
| 86 | return docsLastmod.get(candidate); |
| 87 | } |
| 88 | } |
| 89 | } catch {} |
| 90 | return undefined; |
| 91 | } |
| 92 | |
| 93 | // https://astro.build/config |
| 94 | export default defineConfig({ |