Live data from Hacker News

Astro 1.0 – a web framework for building fast, content-focused websites

astro.build

81–90 of 256 posts

Re: Astro 1.0 – a web framework for building fast, content-focused websites

#81
If you are trying to "flip" websites, SSG isn't the way to go. I created websites with my own SSG using Javascript, Eleventy, Nuxt, Next.

But when I create a website now, I got to stick with Wordpress because they are easier to sell and non tech people can use it.

Re: Astro 1.0 – a web framework for building fast, content-focused websites

#82

Earlier quoted context omitted.

The hardest part of Hugo for me was creating my theme from scratch (docs are eh on this but I found some good 3rd party tutorials) but after that it's been an absolute breeze. After spending a little time understanding Go templating it is really beautiful

Half way through customizing a Hugo theme, I suddenly realized that I don't need a theme at all. Hugo can be used themelessly, where you just write templates specifically for your site. Everything was so much easier from there.

That was my experience too. There is/was no formal standard for creating themes, just an empty dir (which they consider a feature). Even if they had one or two "official themes" that would have helped tremendously.

Instead we spent a week researching how popular 3rd party themes did things, and made a hybrid. Then we moved away completely. I really wanted it to work for us and we were so close. Hugo is so fast and is brilliant on a couple of things.... but barely missed.

I can't remember exactly but with what we were doing we were going to be heavily dependant on their Scratchpad, which felt like a hack. It's all just hacks, and they like it. Lack of solid conventions, and they LOVE it.

Re: Astro 1.0 – a web framework for building fast, content-focused websites

#83
post #47

It always annoys me when I read something like: To try Astro on your local machine, run npm create astro@latest in any terminal. because it doesn't make it clear to me what to do before this command will actually do anything. No, running this command will not work in any terminal.

Because it is written in JS it assumes you have NodeJS installed. npm is the package manager bundled in with NodeJS.

Re: Astro 1.0 – a web framework for building fast, content-focused websites

#84

Earlier quoted context omitted.

The hardest part of Hugo for me was creating my theme from scratch (docs are eh on this but I found some good 3rd party tutorials) but after that it's been an absolute breeze. After spending a little time understanding Go templating it is really beautiful

Half way through customizing a Hugo theme, I suddenly realized that I don't need a theme at all. Hugo can be used themelessly, where you just write templates specifically for your site. Everything was so much easier from there.

wait do you have a repo example of this or some sort of link?

My theme is so simple I think redoing it as themeless may be better

Re: Astro 1.0 – a web framework for building fast, content-focused websites

#85

Is there a static site generator out there that doesn't require a ridiculous build process every time I do an update? Inevitably, when a new "hot" SSG comes on the scene, I try it, and then go back to compare it to the old "hot" SSG from 2 years ago. Yet, I can never get the old test site I set up running again without massive annoyances. This has happened multiple times. As far as I'm concerned, there's zero reason…

Maybe it's too obscure, but I really like Metalsmith. Once it "clicks" it becomes ridiculously easy to make plugins and to operate, and it generally doesn't go out of date.

That said, it may require a bit of javascript knowledge to get a more customized build running. It does have YAML configuration and a set of useful plugins you can use without touching code, from what I know.

Re: Astro 1.0 – a web framework for building fast, content-focused websites

#88
post #72
post #20

Earlier quoted context omitted.

It's interesting their blog post doesn't mention some of the benefits. Neither does the doc page you linked—at least it doesn't do it succinctly. Essentially Astro lets you build sites using a JS framework like React or Vue without requiring that framework to be loaded on the frontend. By default, components are just HTML content. Super nice for building very fast static sites using a technology you may already be fl…

So they have moved all the previously frontend stuff to backend and output Hot-wired / Liveview / Livewire instead?

I wish. AFAIK it's just classic server-side rendering with full-page navigation. Mind you, that's the optimal solution in many cases. But a full-stack JavaScript web framework with something like Phoenix's channels and LiveView built in would be a killer combination.

Re: Astro 1.0 – a web framework for building fast, content-focused websites

#89

I'm looking at https://docs.astro.build/en/concepts/why-astro/ and I still can't tell what's interesting and unique about this as compared to other options in this space. I acknowledge that this might be a PEBKAC situation, but I'd love to hear thoughts from people who used Next.js, Remix, or whatever and found Astro to be a revelation. It seems like Astro's creators believe "content-focused" is a differentiator, but…

While Astro has a lot of impressive features I found that it was the "developer experience" (god I hate that term) that was superior compared to everything I've tried before.

With Hugo and Jekyll I always needed to go revisit the docs whenever I hadn't worked with it for a while. I never got to the "oh, I get this tool now" phase, where the content generation could just flow without issues.

Publii was cool, but trying to shoehorn everything into fitting in the "Blog" model never quite worked out for me. Also being forced to work in a new IDE wasn't to my liking either.

Here are some of the things I love about Astro:

- The docs are great. You can read through them all really quickly. I tend to prefer systems that are simple to grok, and Astro is just that.

- The lightweight Astro components (https://docs.astro.build/en/core-concepts/astro-components/) were great for me, because they delivered on being able to create reusable pieces of code very easily (without having to touch React).

- Being able to generate part of your site from markdown and part of it from precisely crafted HTML is a great way to be able to handle both repetitive and unique content.

- The Astro themes (https://astro.build/themes/) are a great way to start. Find something that's somewhat similar to what you want to build and study how they did it.

This is obviously very subjective, but for me Astro was the first SSG that I really enjoy using, and that I didn't feel like I had to fight against.

Re: Astro 1.0 – a web framework for building fast, content-focused websites

#90

Is there a static site generator out there that doesn't require a ridiculous build process every time I do an update? Inevitably, when a new "hot" SSG comes on the scene, I try it, and then go back to compare it to the old "hot" SSG from 2 years ago. Yet, I can never get the old test site I set up running again without massive annoyances. This has happened multiple times. As far as I'm concerned, there's zero reason…

Yet, I can never get the old test site I set up running again without massive annoyances. This has happened multiple times.

Pin your dependency versions and never suffer this problem again! Shrink-wrap your node modules and don't even download them again! Use Yarn's offline cache to share package tarballs between applications to save on disk space!

There are many options for this problem. And that's just in the JS ecosystem. Use something Ruby or Go based and it's even better.

As far as I'm concerned, there's zero reason your landing pages and blog should require 3,000 dependencies to run.

Except there really, really is. A static site generator is really an optimizing compiler for 4 or 5 different languages (html, css, js, markdown, a template language, etc), with a build tool chain, and often image optimization, and a server for dev, and usually some sort of semi-opinionated structure that scans a directory tree and magically turns that into something you can just throw up to a web server and have a working website. They're complex systems pretending to be "simple and easy" because the output is essentially HTML with a few whistles.

You certainly can build a site generator with far less code, but when people want a lot of flexibility just by tweaking a JSON config file that necessitates complexity. And in JS, that means more packages.

The beauty of tooling is that there are lots of alternatives if you feel you want to optimize for dependencies instead.

Post reply on HN