Update deno.mdx#6535
Conversation
It _is_ possible to deploy a static Astro site. This is to correct the documentation since Deno supports static sites through deployctl.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Hello! Thank you for opening your first PR to Astro’s Docs! 🎉 Here’s what will happen next:
|
Fryuni
left a comment
There was a problem hiding this comment.
Great! Congrats on your first PR to Astro Docs, hope your rocket had a smooth launch. Welcome to orbit!
| 2. In the terminal cd to the `./dist` folder and run the deploy command with the following parameters | ||
|
|
||
| ```sh | ||
| deployctl deploy --project=<MY-DENO-PROJECT> --entrypoint=https://deno.land/std@0.211.0/http/file_server.ts |
There was a problem hiding this comment.
Do this file server behave as an Astro project would expect? The key behaviors that normally need to be configured on static deployments without an adapter to do the work are:
- Folder indexes are handled the same way as Astro, so it matches what Astro generates (remember that this is configurable in Astro)
- Trailing slashes match Astro's configuration
- 404 pages are handled correctly
Taking as an example NGINX. You clearly can host any static site with it, but if you try to host an Astro site with the default configuration it will misbehave. There is a section on the docs with a configuration that allows serving an Astro static output correctly. Would an example like that be needed here or does it work out of the box?
There was a problem hiding this comment.
Thanks for the review @Fryuni
Sorry for the late reply. It's been a hectic couple of days.
I tested the 404 scenario you mentioned and it's indeed an issue. When deployed 404.astro or 404.md is not recognised.
What's the best approach? Shall I close the PR until I have a something more complete that addresses the issue?
There was a problem hiding this comment.
If you know of a way to configure that file server to serve the 404 correctly, you can include it as the required configuration for that option.
If you don't know of a way, or if you know that there isn't one, then I believe it is better not to make this change.
|
Hi @Giwan ! Thank you for adding this update to reflect what is now possible. I'm sure that would help a lot of people! I just wanted to make sure you noticed that you have a review comment here to address before we can continue. Are you available to respond to this? |
sarah11918
left a comment
There was a problem hiding this comment.
LGTM, thank you very much for this contribution @Giwan , and if you'd like to make another PR in the future for static sites, you are welcome to!
Welcome to Team Docs! 🥳
Thanks @sarah11918 |
Description (required)
It is possible to deploy a static Astro site. This is to correct the documentation since Deno supports static sites through deployctl.
Related issues & labels (optional)