astrojs Questions
2
I'm having trouble adding Vuetify 3 to Astro when using the Vue integration.
This is what I have so far:
import { defineConfig } from 'astro/config';
import vue from '@astrojs/vue';
import vuetif...
Federative asked 26/8, 2022 at 9:8
7
Solved
Is there a way to use and SVG file in an Astro file directly without using the <img /> tag. I want something like this:
import Logo from "./logo.svg"
and then use it like this:
<...
2
Solved
I'm trying to extract data from pdf files and return it. here's the code in the serverside in astro
import * as pdfjsLib from "pdfjs-dist";
pdfjsLib.GlobalWorkerOptions.workerSrc = "...
Tobietobin asked 1/5, 2024 at 19:50
1
I am trying to use the @vercel/og package to create an api route to generate open graph images.
I have an Astro application and basically copied the framework agnostic vercel example:
// api/og.ts
...
Halimeda asked 3/5, 2023 at 4:32
6
Solved
I'm using quite a new technology called Astro (https://astro.build/) to build a completely static, server side rendered page, shipping zero JS.
I have a page with a form that is a simple text input...
Fourier asked 30/11, 2021 at 17:52
4
Solved
I am currently working on Astro (astro.build) and would like to use it with the latest Bootstrap version.
Does anyone know about Astro and can please explain to me how to properly integrate Bootstr...
Cliffordclift asked 28/9, 2022 at 9:55
5
Solved
I created a landing page using Astro with Tailwind CSS. And it is currently hosted on Vercel. I wanted to try out the analytics service provided by Vercel. I have been able to avail the Audience an...
2
Solved
I am trying to build a web app with Astro + Reactjs, but I got an issue on calling useEffect. Basically useEffect is not calling, I don't get any logs in the terminal or any warnings/errors in the ...
Dressingdown asked 25/11, 2022 at 22:42
3
Solved
I have set up Astro project that has Tailwind and Daisy UI installed, but I am unable to get Daisy controls to work. I copy/pasted the code from the accordion page, but when the page is rendered, t...
Caladium asked 18/7, 2023 at 16:56
1
Solved
I'm trying to write a new blog post with MDX within my Astro.js blog, but it keeps throwing Unexpected ExpressionStatement in code: only import/exports are supported any time I include a React-base...
3
Solved
What I'm trying to do
A simple way to render the content of a markdown file when it's passed as a string to another component using .compiledContent (or even using .rawContnent)? Or even a be...
Cleon asked 20/12, 2022 at 15:9
5
I'd like to be able to have a dynamic page in Astro that renders out an Astro component. I've dug into the docs and code, and couldn't find a function like the one below (Astro.render). Ideally, I ...
Sirree asked 17/8, 2022 at 4:32
1
Solved
md vs mdx
md import pipeline renders to html, mdx import pipeline renders to .js/.ts/.jsx... which allows to customize html tags with Astro components.
goal
I would like to take advantage of the md...
1
Solved
I'm new to javascript in general and learning Astro. I couldn't figure out what's wrong with this conditional? The site builds but it's not finding matches and always ends in "unknown kind&quo...
Treva asked 8/10, 2023 at 7:22
2
Solved
I'm working with an Astro component that already has some classes in its template. I'm looking to reuse this component in a different view to alter the color of its header exclusively for that view...
Neologize asked 4/4, 2023 at 19:37
1
Here is my example. How to call greeting() function from the button?
---
import Layout from "@layouts/Layout.astro";
const greeting = () => {
console.log("Hello, server");
}...
Farnesol asked 26/7, 2023 at 18:34
7
Solved
I found this (github) html starter page for google auth, and I wanted to make it into a astro component. Im wanted to convert this to a .astro file and be able to pass in the variables for CLIENT_I...
Unkindly asked 27/8, 2022 at 14:49
1
Solved
How to pass variable from frontmatter to script in Astro js. Like this:
---
const title = "this is title"
---
some content
<script>
const metatile = title
<script>
Affirm asked 18/7, 2023 at 15:31
2
Solved
How could i put a condition in a component astro JS.
for example, how could i display a item if only is "DOG" ?
---
const items = ["Dog", "Cat", "Platypus"];...
Violoncellist asked 12/2, 2023 at 21:25
1
Solved
As an example, I have an Astro app with a collection /collections/artworks where each artwork specifices a cover image via the frontmatter cover: '../assets/artworks/1-hello/cover.png - the file li...
1
Solved
Is it possible to inject HTML from file in Astro?
Something like set:html="..." but instead of string, I want to pass file path, for example /icon.svg
Relive asked 13/6, 2023 at 13:52
1
Solved
Using Astro with TypeScript, I'm creating a reusable UI component. The component is just a wrapper for the <a> HTML tag. The problem is I would have to define the interface Props with all the...
Petuntse asked 7/2, 2023 at 9:14
1
Solved
I have a static site with a blog section using Astro's built-in pagination, doing something like this in src/pages/blog/[page].astro:
export const itemsPerPage = 12
export async function getStatic...
Vacate asked 22/12, 2022 at 12:12
2
Solved
I've got an Astro.js layout file with a header, footer, and all the other things I want to appear on every page on my site. There are two areas (names slots) that I want to put page content into. O...
Schauer asked 21/12, 2022 at 16:31
1
Solved
I am using a react component for my astro project but the onclick event is not getting called.
I am just trying to print link clicked when the link would be pressed, but I can't see any event being...
Procrastinate asked 21/12, 2022 at 11:20
1 Next >
© 2022 - 2025 — McMap. All rights reserved.