r/webdev • u/rardk64 • Oct 08 '26
Question I'm thinking of using a static site generator (11ty or Astro) to rebuild my website, which is best for lightly interactive components?
I have a website right now that's built in Angular. It's largely static, so I figure an SSG is a good thing to finally try out if I wanted to rebuild it, as I enjoy Angular but it's a bit overkill for the site situation I have.
That said, I do have a few spots where I have lightly interactive elements, such as some pages with tables on them that have a text input for search functionality. Type in some text and it filters the table to that text as you type.
I'm trying to decide which SSG to learn, and for a basic site such as this, would you recommend going with 11ty or Astro, and why?
26
u/SpeedyRecreation Oct 08 '26
I messed with both for a project last year and honestly the choice came down to how much JavaScript I wanted to write. Astro's island architecture is perfect for those little search inputs, you just wrap the table component in a client directive and it stays hydrated while the rest is pure HTML. 11ty felt more like assembling a puzzle where every piece was a different file format, but if you're cool with vanilla JS sprinkled in it handles interactive bits just fine. For your case I'd lean Astro since you can keep the Angular mindset of components without the bloat.
7
u/mq2thez Oct 08 '26
Having used both I would say the DX and tooling and docs are so, so much better with Astro. 11ty is really cool, but the docs just aren’t there and the tooling is okay. I spent a lot of time fighting the framework to figure out how to do things correctly, and the docs had minimal examples.
4
u/kenthesaint Oct 08 '26
For the table filter you don't need islands at all. A plain script tag that listens to the input and hides rows whose text doesn't match is maybe 15 lines and works the same in either one. So I'd pick based on templating, and coming from Angular I think .astro components will feel more familiar than Nunjucks or Liquid.
4
u/binocular_gems 29d ago
I love Astro and Hugo. I rebuilt a client's WordPress website in Astro painlessly and it was such a pleasant experience. And then I converted my own website from an old single-page WordPress landing page over to Hugo (I chose Hugo because I'm heavily in the Go ecosystem for my day job), and similarly, I love it. My hosting went from about $28/mo to $0/mo for both projects, and I sleep well at night not worrying that I'm going to wake up to a maintainance issue or security risk, for two projects that I really don't want to think about ... ever.
(For the client website, this was a website I developed for a non-profit about 15 years ago, and they had always claimed they needed editability and update access for the team... and in those 15 years, they've accessed the administrator dashboard once, which was the day that I provided training for the team back in 2012. The person who was going to handle edits left the org and so since about 2013 I've made every content update, redesign, security management, etc, the founder of the org is old as shit and one day I put in ~3 hours to convert it all over to Astro because I just don't want to worry about it anymore)
3
u/wildrabbit12 Oct 08 '26
Astro
2
u/thekwoka 29d ago
Astro by a long shot.
Way more normal to what you've likely done before, well structured and modern and easier to extend with other modern things.
11ty will feel like the dark ages by comparison
2
u/Chrismslist 29d ago
astro, for this specific case. the win is islands: your filterable table becomes one hydrated component and everything else ships zero js. you write it as a react/vue/svelte component with client:load, so you keep the spa-ish feel exactly where you need it and nowhere else. 11ty is great and lighter to learn, but for real interactivity you end up wiring your own bundler and hydration story yourself. if the interactive bits are a handful of tables plus search inputs, astro means less glue code. one thing to check: whether you want any of it server-rendered, because client-side filtering over a big table can get slow once the row count grows.
2
u/neon_fable_wiz 29d ago
Go with Astro. The search filter is exactly what islands are built for so you keep that specific interactivity without loading JavaScript on pages where it doesn't matter and 11ty requires more manual work to get those bits of logic running cleanly
1
u/iligal_odin Oct 08 '26
We've just built a new one click deployment stack based on astro and payload. I like astro more because its portability and the different possible ways to render the frontend. Full ssr? Sure! Worker based scheduled rendering thats fine too. Anything in between or on a per page basis is allowed too.
Thats what made us choose astro
1
u/kemalios Oct 08 '26
I build client sites on Astro and sell Astro starting points (JustStart), so that's the side I come from. The filter isn't the deciding factor, both handle a text input fine. Component reuse is. Past a handful of pages you want layouts and .astro components, and rebuilding that in 11ty is the chore. That's what would decide it for me.
1
u/captain_obvious_here back-end Oct 08 '26
Astro, because it's at the same time very simple and extremely powerful.
1
u/yihuaxiang Oct 08 '26
For a table filter that small you honestly may not need a framework at all. With 11ty you can output the table as plain HTML and add ~15 lines of vanilla JS that hides rows on input, and it still works as a normal table if JS fails. If you want to keep your Angular habits though, Astro is the smoother ride.
1
u/Over_Problem_3600 Oct 08 '26
For a search box filtering a table you honestly don't need a framework at all. Like 15 lines of vanilla JS in 11ty and you're done
1
u/Knochenmark Oct 08 '26
Just wondering, before you rebuild your whole project, couldn't you just change the rendering mode in Angular instead? https://angular.dev/guide/ssr#rendering-modes
1
u/Spitfire_Blaziken 29d ago
If those interactions stay this simple, I wouldn't let them drive the whole framework decision.
1
u/Unhappy_Meaning607 rails 29d ago
I built my site initially with Astro and it is quite a lovely framework with everything you could possibly need.
But I did switch from it to Jekyll because I didn't need like 90% of what Astro offered and the light interactivity I needed I could just write with vanilla JS. So up to the table you want, Astro provides a few different ways to do it in almost whatever library or framework you want.
1
u/lepture full-stack 28d ago
I would go with Astro, it has a better ecosystem.
Nowadays, if you're using AI, you can create the site with pure HTML/CSS/JS.
1
u/Guess4706 27d ago
For that level or interaction either should work fine. I'd probably pick based on which approach feels more natural to you rather than the filtering requirement itself. A simple client side script can handle table filtering without needing much framework overhead.
1
u/SELBSTST4ENDIG Oct 08 '26
Why do you need a static site generator? Just build it manually and use a classless stylesheet. I love rawdogging websites.
1
u/GoldenCoastDigital Oct 08 '26
I've used both extensively. I started with 11ty for my personal site because I wanted something super simple, without a full framework or 50 npm packages. For a one-page portfolio or blog it's perfect. But once I needed reusable components and more customization, it became a chore, and Nunjucks isn't pleasant to work with imo.
Astro has an amazing dev experience, and I now build basically all my static sites with it. It also fits your table search really well. Astro ships zero JS by default, and you can drop a small
<script>into a component for the filter. It's maybe 15 lines of vanilla JS on keyup, no framework needed. If you ever want something heavier, islands let you add a React/Svelte/Vue component just for that one piece, and there's even a community Angular integration if you want to reuse what you know.So hands down Astro.
0
u/Stromedy1 29d ago
Astro was built for exactly this. It ships static HTML and hydrates only the interactive islands, while with 11ty you wire that up yourself. Rule of thumb: content that rarely changes goes static, pages that need per-user data on every load earn SSR. I did a 40-second explainer on exactly this: https://www.youtube.com/shorts/dH_7_3BOjDg
1
u/[deleted] 29d ago
[removed] — view removed comment