Przejdź do głównej zawartości

Migrating from Eleventy

Ta treść nie jest jeszcze dostępna w Twoim języku.

Eleventy is an open-source static site generator that works with multiple template languages.

Key Similarities between Eleventy (11ty) and Astro

Section titled Key Similarities between Eleventy (11ty) and Astro

Eleventy (11ty) and Astro share some similarities that will help you migrate your project:

  • Both Astro and Eleventy are modern, JavaScript-based (Jamstack) site builders.

  • Astro and Eleventy both allow you to use a headless CMS, APIs or Markdown files for data. You can continue to use your preferred content authoring system, and will be able to keep your existing content.

Key Differences between Eleventy (11ty) and Astro

Section titled Key Differences between Eleventy (11ty) and Astro

When you rebuild your Eleventy (11ty) site in Astro, you will notice some important differences:

To convert an Eleventy blog to Astro, start with our blog theme starter template, or explore more community blog themes in our theme showcase.

You can pass a --template argument to the create astro command to start a new Astro project with one of our official starters. Or, you can start a new project from any existing Astro repository on GitHub.

Terminal window
npm create astro@latest -- --template blog

Bring your existing Markdown (or MDX, with our optional integration) files as content to create Markdown or MDX pages.

Your Eleventy project allowed you to use a variety of templating languages to build your site. In an Astro project, your page templating will mostly be achieved with Astro components, which can be used as UI elements, layouts and even full pages. You may want to explore Astro’s component syntax to see how to template in Astro using components.

To convert other types of sites, such as a portfolio or documentation site, see more official starter templates on astro.new. You’ll find a link to each project’s GitHub repository, as well as one-click links to open a working project in StackBlitz, CodeSandbox and Gitpod online development environments.

  • Add your own!

Więcej poradników migracji

Pomóż nam

Jak chcesz ją przekazać?

Otwórz Issue na GitHubie

Najszybszy sposób na powiadomienie nas o problemie.

Społeczność
京ICP备15031610号-99