Rendering Model
- astro:
astro
uses a hybrid rendering model that combines static site generation (SSG) with server-side rendering (SSR) and client-side rendering (CSR). This allows for more efficient rendering, as Astro only sends the HTML and JavaScript that is needed for each component, reducing the overall JavaScript payload. - @11ty/eleventy:
@11ty/eleventy
uses a traditional static rendering model, where all pages are generated at build time. It supports multiple templating languages and allows for custom data pipelines, giving developers flexibility in how content is processed and rendered.
JavaScript Usage
- astro:
astro
is designed to minimize JavaScript by default. It allows developers to create components using popular frameworks (like React, Vue, and Svelte) but only sends the JavaScript for components that need it. This approach helps reduce the amount of JavaScript that is loaded on the page, improving performance. - @11ty/eleventy:
@11ty/eleventy
does not impose any JavaScript usage by default, allowing developers to create fully static sites without any client-side JavaScript. However, it is flexible enough to integrate JavaScript as needed, whether for dynamic features or build-time processing.
Component Framework Integration
- astro:
astro
has first-class support for component frameworks, allowing developers to use React, Vue, Svelte, and others alongside static HTML. Astro’s architecture is designed to work seamlessly with multiple frameworks, making it easy to mix and match components as needed. - @11ty/eleventy:
@11ty/eleventy
does not have built-in support for component frameworks, but it can integrate with them as needed. Developers can use JavaScript frameworks like React or Vue within Eleventy projects, but they will need to handle the integration and any necessary build steps themselves.
Partial Hydration
- astro:
astro
supports partial hydration natively, allowing developers to hydrate only the interactive parts of a page. This feature helps reduce the amount of JavaScript that is sent to the client, improving performance while still allowing for dynamic functionality where it is needed. - @11ty/eleventy:
@11ty/eleventy
does not support partial hydration out of the box, as it generates static HTML without any client-side JavaScript. However, developers can implement partial hydration manually by integrating JavaScript frameworks and only hydrating specific parts of the page as needed.
Ease of Use: Code Examples
- astro:
Simple Astro Setup
# Create a new Astro project npm create astro@latest # Navigate to the project directory cd my-astro-site # Start the development server npm start # Build the site for production npm run build
- @11ty/eleventy:
Simple Eleventy Setup
# Install Eleventy npm install -g @11ty/eleventy # Create a simple project mkdir my-eleventy-site cd my-eleventy-site # Create a sample Markdown file echo '# Hello, Eleventy!' > index.md # Build the site npx eleventy # Serve the site npx eleventy --serve