denoland / deno-astro-adapter Goto Github PK
View Code? Open in Web Editor NEWA Deno adapter for running Astro applications on the Deno runtime.
Home Page: https://npm.im/@deno/astro-adapter
License: MIT License
A Deno adapter for running Astro applications on the Deno runtime.
Home Page: https://npm.im/@deno/astro-adapter
License: MIT License
context: #11 (comment)
Now we (Deno) maintain this module. So we need to move the module from @astrojs/deno
to somewhere else.
I'm trying to get content collections running using SSR with Deno.
Using the deno-astro-template Astro works, but the collections is empty:
---
import Layout from "../../layouts/Layout.astro" //"../../layouts/main.astro";
import { getCollection, getEntry } from "astro:content";
const blog_carddata = (await getCollection("blog"));
---
<Layout>
<div>CARDDATA: {blog_carddata}</div>
</Layout>
blog dir and mdx files are existing in: src/content/blog/xx.mdx
config.ts with
import { defineCollection, z } from "astro:content";
const blogCollection = defineCollection({..});
export const collections = {
blog: blogCollection,
}
There's been a recent major release of Astro https://astro.build/blog/astro-4/, and from the looks of things this adapter should work, however the peerDependency expects astro@^3.0.13
https://github.com/denoland/deno-astro-adapter/blob/main/package.json#L37.
I was trying to use this adapter with output set to hybrid
.
export default defineConfig({
output: 'hybrid',
adapter: deno(),
});
This doesn't cause any errors; my console shows the message "Server running on port 8085"... but when I visit 0.0.0.0:8085
I get an empty 404.
I eventually figured out that changing output from hybrid
to server
fixed the issue.
Is there any plan to add support for hybrid mode? (I am willing to help)
If not, maybe this should be mentioned in the readme, or the server could throw an error on startup.
When running on Deno Deploy I get: TypeError: process.cwd is not a function
My repo is open source: https://github.com/cool-calm/calculated-world
Hi, I want to use the deno adapter and deno deploy alongside turso db. How do I store the environment variables necessary? By default .env variables get embedded into the build. It seems to me it'd be wiser to have them in the deployment environment instead. Can we do that somehow?
ASD=111
ASD=123 pnpm run build
results in FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
do we use import.meta.env
or ?
As mentioned in the title, I keep seeing this error when attempting to run Astro's build step. I see that very recently the Deno team finally updated the repo here to utilize Astro 4.0, but it seems they might have missed a step. ๐
I using deno adapter.
deno task dev
=> Deno is working! but, process.env is not defined error (using react component)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.