pnpm is an optional alternative to npm that needs to be installed separately.
yarn dlx @11ty/eleventy --serve
Yarn is an optional alternative to npm that needs to be installed separately.
Eleventy 会将当前目录下的任何带有有效的 文件扩展名 (md is one of many) 的文件编译并输到 _site 文件夹下。运行过程中会有类似下面这样的输出:
[11ty] Writing _site/index.html from ./index.md (liquid) [11ty] Wrote 1 file in 0.03 seconds (v3.0.0) [11ty] Watching… [11ty] Server at http://localhost:8080/
a11yproject.com launched with version 1.0.0 of Eleventy. […] It's been a little under three years and I haven't had to make any adjustments to its dependencies, and it can still install and run from a cold start with no complications. When I update the site to use version 2.0.0 I'll actually be removing dependencies, and not adding more. […] That's rare and special.— Eric Bailey
Eleventy 并不要求你使用任何 JavaScript 框架,这意味着 在默认情况下客户端可以没有任何 JavaScript 代码。我们 从长远考虑,不参与框架竞赛。你的前端技术栈中使用的工具链、模块和组件都能与 Eleventy 脱钩。你可以在Work from a solid foundation of 预渲染模板 的坚实基础上进行开发,以满足你的项目对 渐进式增强 的要求。
“I looked into and actively tried using various static site generators for this project. Eleventy was the only one I could find that gave me the fine-grained control I needed at blazingly fast build times.” —Mathias Bynens