I like the idea of "performant, content-focused websites" but the website itself hosting Astro doesn't really feel performant. When I scroll down it struggles on my quite powerful desktop computer.
I read entire documentation yesterday, and I am very impressed. Looks fantastic, with some great conventions if you need it quick, but fully customizable if you change your mind later. I particularly like the fact that I can switch from SSG to SSR and back.
File system as db, markdown with templating and js expressions, nasting layouts, quick random endpoints, filtering of collections, named slots everything repo friendly - whats not to like. Also, great content and looking docs (particularly interactive tutorial).
Nanoc is great, basically framework for creating SSGs. You can literarry do everything and with latest ruby its much faster too - I had some biger site with it that took 10 minutes to build (which is done on any editor input).
The project is also 15+ years old and continiously developed.
It seems like it's not really faster by default, if you watch how the video continues after they announce the first results.
They're going out of their way to imitate the lazy-loading Qwik does by default for the parts that require heavy-lifting, once they disable that the magic's gone.
They weren't, as expert frontend programmers, even 100% sure about what was causing the high scores at first and they had to go and check if it was the lazy-loading for themselves. I'd give an average dev something with the Qwik approach, where they don't have to choose and automated analytics-based PGOs can be performed.
With that said they stated that the server-side rendering part of Qwik is not very optimized. I'd love to see if Qwik.js can get their SSR to perform better or if someone else (hopefully in a better language and runtime) is able to knock that one out of the park.
Astro is tries to rely on SSR as much as possible with MPA approach, so the client have to render as little JS as possible.
Qwiks goal is to be instant for every device, it does this by delaying the download & execution of JS so much it can. Qwik also partially renders the content in its state on the server, then sends it over to the client to do the rest.
We switched to Astro a few months ago. Some team members were not super convinced since NextJs is better known but during our spike to test them both out Astro came on top on ease of use.
We have now been in production for a couple of months and could not be happier. It’s very straight forward for simple sites but we switched a couple of legacy react apps to SSR with it and it was super easy and developer experience is great and speed of rendering could not be better. Looking forward to switching our marketing site next with the help of this new collection API in v2
Astro is freaking amazing. One thing it's made me realize is that most apps don't need global state, and it's one of the reasons Astro has so much good stuff right out of the box.
Maybe I am not understanding completely what you are missing, but there is an SPA integration that gives you instant navigation. It also features pre-fetching, so it’s not limited to already visited pages.
Then what's the point? With NextJS I can have SSR but with client side navigation hydration. It's simply a better solution for that use case than an almost year old random library for Astro. Astro is good for traditional MPAs that don't need much interaction.
> Hi everyone! Sorry for not posting the announcement here, too. I can confirm that we’re going to add Astro support in v2023.1. We will keep you posted on our progress once we start working on the issue and will ask you to give Astro support a try and share your feedback with us. Please keep monitoring the issue for updates.
Had a hard time using MANY existing React ui components from various packages. I guess it is fast but the work involved in trying to build anything more interactive is not worth it just to shape 2-3-10ms. I can't find a plus for using this over something like Hugo (https://gohugo.io/) for example.
I use Go programming and Hugo template is natural for building simple sites, it get harder to maintain complex interactivity and components over time, Astro give you more control on client-side Javascript if performance is your goals.
This video release late but might be useful for introduction to Astro.
Does anyone have any experience with Astro and Sveltekit? What would you choose over the other one in which situation? Is Astro only used for websites that just display content, while Sveltekit can be used for more complex webapps?
I’ve been evaluating these two along with some other options for a project over the last couple of weeks.
If you have pretty much entirely static content, Astro will almost definitely be more suitable due to the lower JS you’ll be shipping.
If you need complex interactions and nice client side routing you’ll want SvelteKit. You can embed SPA routers etc within Astro but I feel like once you’re going down that route you might as well just use a more appropriate meta framework.
For something in between, it’s a toss up.
I will say SvelteKit is the best frontend meta framework I’ve tried so far. Happy to answer any specific questions.
Been building my blog with this the last couple of weeks. It's great and this version seems to sand down some of the rough edges (error messages used to be terrible, now they look like they'll be useful, content collections mean I don't have to glob everything then filter). Oh and markdown type checking is really cool. Looking forward to seeing how it develops over the next few years.
Was this post written by ChatGPT? Were many other comments in this thread written by people with undisclosed interest in this project (e.g. employees, founder friends)?
Maybe I'm thinking too much about it, but I got triggered by "This new release is a game-changer for anyone working with Markdown on the web", the style of writing is very similar to ChatGPT... Also, I work with markdown on the web and never had any problems with it, not sure what's the problem solved by Astro.
> Astro now helps you organize your Markdown with built-in parsing, validation, and automatic TypeScript type generation.
The bolded text leading the paragraph of your quote:
> deliver complete type-safety for Markdown and MDX
The announcement is about typing MDX. Also, Astro just works out-of-the-box with MDX, Next.js you have to do configuring. In others your don't get SSR. Personally Astro has the easiest and most flexible markdown experience ever. It makes sense to focus on that support and to lead with it. You can even have templates in JSX with MDX content files, cool stuff like that.
The Hybrid Rendering feature is really cool too. I have a few pages I wanted to SSR, but most of the site can be SSG. This saves from needing two projects. I can select pages to generate at build.
The rest of the error message optimization and dev tool improvements is always welcome.
No, Astro is just that good. For me it feels the same as when first tried React's hooks. It's just so good and obviously a better approach.
For content based sites it definitely feels like a massive game-changer because you can write everything in any framework and render it all to static HTML. Or if you need some JS you get hydrations out of the box for free.
The type-safe MD/MDX in 2.0 seems very useful as well. Pre-defined functions for fetching content which have auto-completion and typing sounds very exciting for DX.
I think I will give Astro another try but from my experience it was a bit clunky. There were a ton of dependencies and it did not go smooth at the beginning.
47 comments
[ 5.0 ms ] story [ 151 ms ] threadGuess it's time to learn how smooth the upgrade path is...
File system as db, markdown with templating and js expressions, nasting layouts, quick random endpoints, filtering of collections, named slots everything repo friendly - whats not to like. Also, great content and looking docs (particularly interactive tutorial).
Reminds me a lot of nanoc SSG framework (ruby).
The project is also 15+ years old and continiously developed.
https://docs.astro.build/en/concepts/mpa-vs-spa/#case-studie...
They're going out of their way to imitate the lazy-loading Qwik does by default for the parts that require heavy-lifting, once they disable that the magic's gone.
They weren't, as expert frontend programmers, even 100% sure about what was causing the high scores at first and they had to go and check if it was the lazy-loading for themselves. I'd give an average dev something with the Qwik approach, where they don't have to choose and automated analytics-based PGOs can be performed.
With that said they stated that the server-side rendering part of Qwik is not very optimized. I'd love to see if Qwik.js can get their SSR to perform better or if someone else (hopefully in a better language and runtime) is able to knock that one out of the park.
Astro is tries to rely on SSR as much as possible with MPA approach, so the client have to render as little JS as possible.
Qwiks goal is to be instant for every device, it does this by delaying the download & execution of JS so much it can. Qwik also partially renders the content in its state on the server, then sends it over to the client to do the rest.
https://github.com/RafidMuhymin/astro-spa
Update, they created Snowpack (https://www.snowpack.dev), PikaCDN (now Skypack, https://www.pika.dev/cdn),
> Hi everyone! Sorry for not posting the announcement here, too. I can confirm that we’re going to add Astro support in v2023.1. We will keep you posted on our progress once we start working on the issue and will ask you to give Astro support a try and share your feedback with us. Please keep monitoring the issue for updates.
Sounds like it's coming soon!
With Astro it is just components. I am used to those. The cognitive load is much lower.
This video release late but might be useful for introduction to Astro.
https://www.youtube.com/watch?v=SICd8tTEqvs
If you have pretty much entirely static content, Astro will almost definitely be more suitable due to the lower JS you’ll be shipping.
If you need complex interactions and nice client side routing you’ll want SvelteKit. You can embed SPA routers etc within Astro but I feel like once you’re going down that route you might as well just use a more appropriate meta framework.
For something in between, it’s a toss up.
I will say SvelteKit is the best frontend meta framework I’ve tried so far. Happy to answer any specific questions.
Astro 1.0 – a web framework for building fast, content-focused websites - https://news.ycombinator.com/item?id=32401159 - Aug 2022 (249 comments)
Maybe I'm thinking too much about it, but I got triggered by "This new release is a game-changer for anyone working with Markdown on the web", the style of writing is very similar to ChatGPT... Also, I work with markdown on the web and never had any problems with it, not sure what's the problem solved by Astro.
> Astro now helps you organize your Markdown with built-in parsing, validation, and automatic TypeScript type generation.
The bolded text leading the paragraph of your quote:
> deliver complete type-safety for Markdown and MDX
The announcement is about typing MDX. Also, Astro just works out-of-the-box with MDX, Next.js you have to do configuring. In others your don't get SSR. Personally Astro has the easiest and most flexible markdown experience ever. It makes sense to focus on that support and to lead with it. You can even have templates in JSX with MDX content files, cool stuff like that.
The Hybrid Rendering feature is really cool too. I have a few pages I wanted to SSR, but most of the site can be SSG. This saves from needing two projects. I can select pages to generate at build.
The rest of the error message optimization and dev tool improvements is always welcome.
Not affiliate with Astro btw.
For content based sites it definitely feels like a massive game-changer because you can write everything in any framework and render it all to static HTML. Or if you need some JS you get hydrations out of the box for free.
The type-safe MD/MDX in 2.0 seems very useful as well. Pre-defined functions for fetching content which have auto-completion and typing sounds very exciting for DX.
[1] https://iles.pages.dev/
[2] https://iles.pages.dev/faqs#astro
Astro might just be the solution. It is for a largely text-based project.