Yep! For example you can use Astro.glob('Games/*.astro') to import all Astro files from that folder
https://docs.astro.build/en/reference/api-reference/#astroglob
#All astro Files in folder to a single Astro File.
1 messages · Page 1 of 1 (latest)
Can you give me the whole thing like what to type. I'm new to development , I just started doing javascript too. So the only main things I know is currently HTML and CSS. And I'm also having hard time reading that. Sorry. I would appreciate if u would. Or if there is a video.
So you'd do something like
---
const components = await Astro.glob('Games/*.astro')
---
and components would be a list of the imported Astro components
meaning if i use Collective tag somewhere if will contain all of those components.
what do you mean by Collective?
by collective i mean the astro file into which all of the components are being added.
in image it's CollectiveGames.astro