725 questions
0
votes
1
answer
16
views
Type 'Loader' is not assignable to type 'undefined' in Astro Content Config
I am getting the following linter error in my src/content.config.ts file:
Type 'Loader' is not assignable to type 'undefined'
File contents:
import { defineCollection, z } from "astro:content&...
0
votes
0
answers
13
views
vs code Go To Definition for alias path css import in Astro project does not takes to original file but to client.d.ts file
I have Astro based project where using path alias for css file.
{
"paths": {
"@/assets/*": [
"src/assets/*"
]
}
}
and here is importing css ...
0
votes
1
answer
20
views
Configure Absolute links using ASTROJS <fragment> Component applied to JSON API DATA [closed]
I am using AstroJS v5.0.0-beta.12 and loading data from a prefomatted json file with html links formatted like this <a href="https://www.example.com>example link text</a>.
When I ...
0
votes
1
answer
43
views
Astrojs - Google Map embed
I want to embed google map into my astro app.
i found this site give a tutorial and follow the instruction.
However I got errors:
GET https://maps.googleapis.com/maps/api/mapsjs/gen_204?csp_test=true ...
2
votes
0
answers
74
views
Astro 5.0.2 with vitest: getViteConfig and renderToSting of container fail
I just upgraded my Astro site to 5.0.2, but there seem to be breaking changes As per the docs, I use the following vitest config (root of project):
/// <reference types="vitest/config" /&...
0
votes
0
answers
30
views
How can I make Astro JS bundle all JS into one file?
I am using Astro JS framework but I need to bundle all my component's JavaScript into one single file.
I have this partially working but Astro/Vite/Rollup are also generating entry JS assets for each ...
-3
votes
1
answer
45
views
What does `**\/[^_]*.md^` in Astro glob() Match?
In The docs for the new Astro 5.0.0 release, the new syntax for content collections is introduced docs are here
In there, I see a glob pattern **\/[^_]*.md but not how this should differ from **\*.md. ...
0
votes
0
answers
25
views
Customizing `defineCollection` in Astro
Situation
I have a website with some bilingual MDX pages. My preferred way to organize my files is to have everything related to one "entry" in a single folder:
- blog
- 01
- index.th....
0
votes
0
answers
26
views
Astro project fails to build on Vercel
I'm trying to deploy my Astro project on Vercel, but the build keeps failing with the same error message:
at Object.stat (node:fs:1582:16)
at find (file:///vercel/path0/node_modules/vite/dist/node/...
1
vote
1
answer
50
views
dynamic Icon component load one svg but not other
Using Astro v 4.8.0
having and reusbale Icon component which load icon which are under public/icons library and when I pass the name it include the file name and display the icon.
now issue is that ...
0
votes
0
answers
8
views
Issue with importing .geojson files in an Astro project
I'm working on a project with Astro and I'm having trouble importing a .geojson file. I've added the type declaration to src/types/declarations.d.ts and updated my tsconfig.json, but I'm still getting ...
0
votes
0
answers
31
views
How can I make the cursor state persist between pages?
I implemented a cursor from this library https://cursor.oooo.so/ in my portfolio made with astro and preact, my jsx file looks like this:
import { useEffect } from "preact/hooks";
import { ...
0
votes
0
answers
25
views
How to inline astro components in a markdown page
I'm looking for a way to "inject" some generated content in the middle of a markdown file in Astro.
I have been extensively reading the docs, and I can't find the primitives I was expecting ...
0
votes
1
answer
38
views
Astro server mode - run tasks on start
I have a Astro on server mode with the node SRR adapter and using standalone mode and I would like do perform some tasks during the server start e.g. checking if environment variables has been ...
0
votes
0
answers
49
views
ASTRO framework POST METHOD is not working
i am using astro framework here is my code in src/components/test.astro
and form is displaying properly.
<form id="contact-form">
<label for="first-name">First Name:&...