feat: use import.meta.glob instead of Astro.glob
This commit is contained in:
parent
3c5d764711
commit
89a0505526
1 changed files with 5 additions and 7 deletions
|
@ -2,8 +2,12 @@
|
|||
import Layout from '../../../layouts/Layout.astro'
|
||||
import Footer from '../../../components/Footer.astro'
|
||||
import Posts from '../../../components/Posts.astro'
|
||||
import type { AstroInstance } from 'astro'
|
||||
|
||||
const posts = await Astro.glob('./posts/*.astro')
|
||||
// const posts = await Astro.glob('./posts/*.astro')
|
||||
const posts: AstroInstance[] = Object.values<AstroInstance>(
|
||||
import.meta.glob('./posts/*.astro', { eager: true })
|
||||
)
|
||||
const title = 'Previously...'
|
||||
---
|
||||
|
||||
|
@ -17,12 +21,6 @@ const title = 'Previously...'
|
|||
</Layout>
|
||||
|
||||
<style>
|
||||
main {
|
||||
margin: auto;
|
||||
padding: 1em;
|
||||
max-width: var(--content-width);
|
||||
}
|
||||
|
||||
.text-gradient {
|
||||
font-weight: 900;
|
||||
background-image: var(--ayo-gradient);
|
||||
|
|
Loading…
Reference in a new issue