Maybe the #1 cause I really like Astro is that it brings the JavaScript part authoring expertise to the Static Website Generator world with zero JavaScript (besides bits you very particularly opt-in to). That HTML-first method can also be why I like Eleventy. It’s simply that, as superior as Eleventy is, I’d want working in additional fashionable parts and fashionable templating. Plus I just like the build-time JavaScript entry in Astro parts at my fingertips.
However what if Eleventy provided JavaScript templates additionally? Effectively it kinda does—there’s a plugin eleventy-plugin-vue (official) that appears effectively on its means towards that finish. However right here’s one other tackle it from Ben Holmes: Slinkity. I’ll quote the bullet factors:
🚀 Unlocks part frameworks (React, Vue, and Svelte) for writing web page templates and format templates. So you possibly can flip an present .html or .liquid file right into a .jsx file, and instantly begin constructing routes in your web site utilizing React.
🔖 Consists of highly effective shortcodes to insert parts into present pages. Add a line like this to your markdown, HTML, Nunjucks, and so on, and watch the magic occur: {% react ‘./path/to/part.jsx’ %}
💧 Hydrates these component-driven pages on the shopper. In different phrases, all of your dynamic state administration will work in growth and manufacturing with 0 further setup.
🔗 (Optionally) Turns your web site right into a single web page app. This opens the door for animated web page transitions, persistent state between pages, and extra!
It looks as if it’s bringing the Astro vibe to Eleventy. It even makes use of Snowpack, which is the construct device by the Astro staff.
Direct Hyperlink to Article — Permalink
The put up Slinkity appeared first on CSS-Methods. You’ll be able to help CSS-Methods by being an MVP Supporter.
Subscribe to MarketingSolution.
Receive web development discounts & web design tutorials.
Now! Lets GROW Together!