Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
338 views

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 ...
Danielo515's user avatar
  • 7,301
2 votes
1 answer
591 views

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 ...
Jingyi Wang's user avatar
0 votes
0 answers
474 views

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:&...
Aayush Bansal's user avatar
2 votes
2 answers
73 views

I'm trying to write a utility function in my TypeScript project to sort/filter objects in a fairly predictable data model (I'm using Astro for this site). The objects keep all the data useful for ...
bothears's user avatar
3 votes
1 answer
91 views

Working on a Astro 5 (beta10) application. The astro is configured with "output": "server". I have a .tsx component in which I want to fetch data from an API. (Strapi, a CMS). ...
NeitoFR's user avatar
  • 825
0 votes
1 answer
151 views

I am trying to implement user auth using the Shopify Headless customer account API in an Astro app with auth-astro. I have set up my Shopify store with the Headless app properly, I can log in, ...
Taintedmedialtd's user avatar
0 votes
0 answers
116 views

I'm currently working on a site using AstroJS in WebStorm. When I run a dev server npm run dev / npx astro dev, changes I make to page content in files don't update the localhost in my browser (Google ...
Hazrd's user avatar
  • 296
0 votes
0 answers
57 views

I got a mdx file like this and I want to render the foo component in somewhere else. --- title: Hi, World! --- export const title = 'My first MDX post' export const foo = <h1>adsf</h1> # ...
ZeeXoc's user avatar
  • 1
3 votes
0 answers
293 views

I'm adding an email template page to my Astro site that needs it's own very specific styles (and no scripts) but Astro is injecting the site styles and scripts into this layout. /pages/email/[...slug....
DShook's user avatar
  • 15.9k
1 vote
1 answer
559 views

I have recently begun using Astro and am a little confused about how to properly use react components within the framework. I'm sure my error is likely a silly one, I am not a professional developer ...
shub's user avatar
  • 25
1 vote
0 answers
234 views

I'm writing a web in Astro.js. My folder structure is like this: src |-assets | |-images | |-blog | |-image1.jpg |-components | |-BlogPost.astro |-content | |-blog | | |-my-first-...
o..o's user avatar
  • 1,931
0 votes
1 answer
355 views

I have a project on Serverside rendered Astro JS. I 'm try pass variable between .astro files on runtime. For this I use {...}.ts import/exports to share variable between files. a.ts export const data ...
l6ls's user avatar
  • 103
0 votes
1 answer
34 views

I am using Astro and Tailwind CSS. Why is the following not working? I have this HOC HoverScale.astro component: // HoverScale.astro <span class="[&>img]:group-hover:scale-105 group [&...
meez's user avatar
  • 4,888
2 votes
1 answer
152 views

I am not sure on how or if Astro closes database connections upon retrieval of data. Is it that the packages themselves take care of this or the connections "just" drop and it is up to the ...
Dimitrios Mistriotis's user avatar
2 votes
0 answers
114 views

I'm currently working on a project in Astro, using the Flowbite Tailwind component library along with Flowbite React. My question is: how can I change the default cyan-500 color in Flowbite React to ...
Péèlo's user avatar
  • 43
0 votes
2 answers
268 views

I need to import a simple string into an astro starlight MDX file to show the latest version number. My code is basically --- title Version Test desc Show version --- import VERSION from "/src/...
David Bradshaw's user avatar
1 vote
1 answer
2k views

I've upgraded my astro blog to the latest versions and got a problem using the content module of astro. My GitHub Actions CI jobs are failing due to a TypeScript error indicating that the module astro:...
Theiaz's user avatar
  • 844
0 votes
1 answer
67 views

I'm trying to handle a map method that get all my fields from a JSON query. Some of the fields I'm getting are empty which is fine, but when calling them I get an error saying "Cannot read ...
Triphys's user avatar
  • 55
0 votes
0 answers
101 views

I am implementing dynamic routing in Astro SSR mode, based on the id. I can have different routes, with the id on various place like: foo/bar/12345/my-path foo/bar/section/12345/my-path bar/foo/...
meez's user avatar
  • 4,888
0 votes
1 answer
397 views

Problem Description I've completed my Astro project and it works fine locally in both development and build modes. However, when I deploy it to Cloudflare, I'm getting a blank page with no console ...
We_Go's user avatar
  • 35
0 votes
1 answer
147 views

I am totally new to UI and Astro project. I am using astrowind (astro framework) theme to modify the website. I am looking to develop a site which will have pages of content about the site/product and ...
John Williams's user avatar
-1 votes
1 answer
302 views

I tried to deploy my astro project into firebase hosting but i'm unable to deploy them with CI, but able to deploy them in my own machine. here is the log for the CI [2024-10-21T08:50:57.760Z] > ...
newtocoding's user avatar
1 vote
1 answer
265 views

I'm using Astro with the Alpine integration, rendering set to static. I am trying to fetch data and based on the response render some html client side. stats.ts const FUNCTIONS_BASE_URL = import.meta....
Victor's user avatar
  • 182
1 vote
2 answers
575 views

I have a TypeScript library that, under given conditions, should redirect to an error page. One way would be using the internal Astro global object, like with Astro.redirect('/404'). Unfortunately, ...
antonio's user avatar
  • 11.2k
0 votes
1 answer
312 views

I am using Astro and Tailwind CSS. From an Astro component an external script is added which create some HTML dom elements (and its styling). // MyComponent.astro <script is:inline src={import.meta....
meez's user avatar
  • 4,888
1 vote
1 answer
186 views

I have a hybrid site built with Astro and deployed to Cloudflare pages. I have two API endpoints, one for a newsletter signup and one for a contact form - both interact with the SendGrid API. Both ...
Mike's user avatar
  • 685
1 vote
1 answer
210 views

I have an Astro website like follows: Different department folders foo, bar, etc. For each folder, there is a different navigation menu, used by the pages inside. There are some common shared MDX ...
antonio's user avatar
  • 11.2k
1 vote
0 answers
43 views

I'm querying for a web-component defined in a separate Astro component file as set out by this pattern. I'd like typing and so I tried exporting the web-component name in the client-side JS. VSCode ...
Brendan's user avatar
  • 19.6k
1 vote
1 answer
920 views

I am starting to play around with Astro(https://astro.build/) and I am super happy so far. I am trying to build a multi-tenant website with 80+ different designs for one site. Markup should be mostly ...
Markus B's user avatar
0 votes
1 answer
344 views

I have the following Astro component: --- type Props = { uuid: string; }; const { uuid } = Astro.props; --- <div class="my-feature" data-uuid={uuid} ...
meez's user avatar
  • 4,888
1 vote
1 answer
751 views

In the component template section of an Astro page, I am adding the following script: // src/pages/foo.astro <script> document.addEventListener('DOMContentLoaded', function() { const ...
antonio's user avatar
  • 11.2k
0 votes
0 answers
124 views

I'm looking for an automated way - not manually copying files into /public to serve assets that are inside an NPM module. This is quite a common pattern so I would have thought it would be ...
Brendan's user avatar
  • 19.6k
-1 votes
1 answer
593 views

When i tried to build my simple astro blog, Cloudflare was unable to build it and gave this error Cannot bundle Node.js built-in "stream" the: 2024-10-04T08:47:14.977982Z [commonjs--resolver]...
user25019377's user avatar
2 votes
2 answers
1k views

I'm using Astro JS to build a google chrome extension, and I have a problem when using tailwind. Apparently Astro adds the CSS files to an _astro folder in the dist but this causes conflicts with ...
SantiagoP's user avatar
0 votes
1 answer
173 views

Wanting to create a custom plugin for my project but I cannot get the theme colors to work. Any help would be appreciated. Have tried adding the color manually which works but is not ideal to trying ...
Jason Mitchell's user avatar
-1 votes
1 answer
155 views

Here is an example of how i am using the Astro.currentLocale for translations in Astro. --- import { getRelativeLocaleUrl } from "astro:i18n" // Components // imports ... // i18n import { ...
JuanDa237's user avatar
  • 374
-2 votes
1 answer
143 views

In my package.json I have the following package: "dependencies": { "@company/my-package": "0.1.2024.0.1", } I created an astro component MyPackage.astro. Do i ...
meez's user avatar
  • 4,888
0 votes
0 answers
107 views

I have a prototype astro SSR blog. I want to separate the content from the site code so that I can version them independently and allow content collaboration without exposing site code to ...
Steve H's user avatar
  • 87
0 votes
1 answer
193 views

I have a Spline animation that I want to add in Astro but I am not sure how. I don't want to integrate React in order for me to use it. There is a Vanilla JS example but I have a problem importing the ...
omkobass's user avatar
  • 335
0 votes
1 answer
250 views

Lets say I have very simple Astro component which is fetching some data. const data = await fetch("path-to-data.json").then((response) => response.json()); data.map(item => <h2>{...
Gnesh's user avatar
  • 45
1 vote
0 answers
574 views

Using AstroJS: What are the differences between dev preview @astro/node standalone server What I have already, perhaps erroneously, learned: I understand the dev server is Vite under the covers, ...
Steve H's user avatar
  • 87
1 vote
1 answer
173 views

I was trying to import some markdown files in Astro in order to make a "dynamic" blog. I used Astro.glob(). I already had it functioning perfectly. However, since a recent update it stopped ...
kinire's user avatar
  • 11
0 votes
0 answers
475 views

I would be able to use Astro's image in my Vue.JS component so I can import them from assets folder and benefit from performance improvements of it's rendering. Before using Vue.JS I was doing ...
NiceToMytyuk's user avatar
  • 4,497
0 votes
0 answers
302 views

I'm currently developing a platform for open and free education with keystatic and Astro, ideal We created a collection for each major in the university, each of them can create a semester and the ...
Christopher Fabian Mendoza Lop's user avatar
0 votes
0 answers
244 views

We have a page where we are going to call some data from API, and use one of these data to create a variable link. Our page code includes the following which calls 3 variables from API. I plan to use {...
Yousef Keyghobadi's user avatar
0 votes
1 answer
574 views

I am working on an endpoint with AstroJS. The aim here is to have a rest api endpoint that contains the handlers of the submitted forms. In short, the endpoints that I will make requests with the POST ...
user avatar
0 votes
1 answer
224 views

I'm using Astro to make a blog page and I have several posts. I use MDX for the content management. I'd like to insert AdSense units randomly between paragraphs throughout the content. How to to this? ...
gust's user avatar
  • 13
1 vote
1 answer
940 views

I have Astro app with connection to D1 database using Cloudflare and wrangler. According to this tutorial (but using Framework starter - Astro): I created database, added d1 binding in wrangler.toml, ...
Jan Krupiński's user avatar
0 votes
1 answer
44 views

I'm making a website, and I'm pretty much done with it, except for one thing. See, I have an InfoComponent (or card for the sake of simplicity), and on the the 1st and 3rd cards, the images are on the ...
Mike the Scripter's user avatar
2 votes
1 answer
79 views

VS Code 1.92.1 Ubuntu 24.04 Astro based project Prettier extension installed and set formatter for code-snippets extension as below .prettierrc file content printWidth: 140, semi: true, ...
xkeshav's user avatar
  • 54.2k

1 2
3
4 5
16