
Static websites are fast and ideal for many types of websites like blogs, marketing websites, and more. When building websites, you should always use a component-based approach for code simplicity, maintenance, and reusability. Here are a few ways to build a static website using components.
- Web Components – No framework
- Eleventy (11ty) – Very simple and flexible static site generator that supports various template languages (Handlebars, Nunjucks, etc)
- Astro – Very similar to Eleventy, with the advantage of being able to load premade components from React, Vue, Svelte, etc.
- Svelte – More like React, but better. Outputs static files. Has native benefits like CSS optimizations and the ability to create interactive apps, if necessary.
The following video does a great job in comparing and demonstrating building a static site using web components and Svelte.