Eleventy 开发服务器支持实时刷新,Vite 以中间件形式接入
eleventy-plus-vite — Eleventy 启动器模板
作者 matthiasott
基于 Eleventy 与 Vite 的静态站点启动器,集成开发服务器、构建后处理、CSS 处理与常用站点文件。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 2
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
生产构建由 Vite(基于 Rollup)对 Eleventy 输出做后处理
PostCSS 流程包含 Autoprefixer 与 cssnano,浏览器目标可在 package.json 中配置
默认提供 Sass 目录结构,也支持普通 CSS 并通过 PostCSS Nesting 使用嵌套
包含关键 CSS 内联与主 CSS 异步加载、Web 字体加载策略示例
自带 RSS 订阅、XML 站点地图与基础深色模式支持
模板详细介绍
这是一个 Eleventy 启动器项目,把 Eleventy 的静态站点生成能力与 Vite 的构建流程结合起来。开发阶段使用 Eleventy 自带的开发服务器并支持实时刷新,Vite 以中间件形式接入该服务器;生产构建时,Eleventy 的输出会再交给 Vite(基于 Rollup)做后处理。
样式方面,项目默认采用 Sass,并附带作者自己的一套目录结构,也可以改用普通 CSS,通过 PostCSS Nesting 插件支持嵌套写法。PostCSS 流程包含 Autoprefixer 与 cssnano,浏览器目标可在 package.json 的 browserslist 中调整。项目还演示了关键 CSS 的生成与内联,主 CSS 文件随后以异步方式加载;并包含一个 Web 字体加载策略示例、基于 Utopia 的流式排版、使用 prefers-color-scheme 与 CSS 自定义属性的基础深色模式,以及 focus-visible 的 polyfill。
站点基础文件包括 RSS 订阅与 XML 站点地图。README 的 Roadmap 中列出了尚未完成的内容:更多基础样式与展示示例样式的演示页、深色模式切换按钮、面向现代 CSS 布局的进阶基础样式,以及 Webmention/IndieWeb 支持。
使用方式为基于该仓库生成新仓库,克隆后执行 npm install 安装依赖;npm start 或 npx @11ty/eleventy --serve 启动开发服务器,npm run build 或 npx @11ty/eleventy 执行生产构建。项目采用 MIT 许可,可免费使用、修改、商用与分发,但演示图片、字体、图标等第三方素材需单独核对许可。
适合你的项目吗?
适用场景
- 需要一个 Eleventy 与 Vite 结合的静态站点起点
- 希望样式经过 PostCSS 处理并包含 Autoprefixer、cssnano
- 想参考关键 CSS 内联与异步加载 CSS 的实现方式
- 需要为静态站点补充 RSS 订阅与 XML 站点地图
适合人群
- 使用 Eleventy 构建静态站点的开发者
- 希望在 Eleventy 中引入 Vite 构建流程的团队
- 偏好 Sass 或带嵌套的普通 CSS 工作流的项目
- 需要 RSS、站点地图与基础深色模式等常见站点能力的站点
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
可通过 GitHub 的 generate 功能基于该仓库生成新仓库
- 2
克隆或下载后执行 npm install 安装依赖
- 3
npm start 或 npx @11ty/eleventy --serve 启动开发服务器
- 4
npm run build 或 npx @11ty/eleventy 执行生产构建
- 5
README 提供部署到 Netlify 的按钮,第三方素材需自行核对许可
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据
https://github.com/matthiasott/eleventy-plus-vite/blob/main/LICENSEhttps://github.com/matthiasott/eleventy-plus-vite/blob/main/README.mdPermission is hereby granted, free of charge
许可证原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-01。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料较完整 · 96 / 100
- 技术栈
- Eleventy · Vite
- 网站类型
- 启动器
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2026-09-14
- 截图检查日期
- 2026-10-01
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Eleventy。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。
查看当时使用的来源资料
SHA-256: 76955dde9eae762f39e045904f74d749e518fe0579baed614e105ec0efa80a89
2026-10-01T15:03:13.867Z
来源文件 / 仓库# Eleventy Plus Vite <br>🏃💨 A clean and fast Eleventy Starter Project with Vite. [](https://app.netlify.com/sites/eleventyplusvite/deploys) ## Features * Eleventy v3 * Eleventy Dev Server with live reload * Vite v8 * Vite as Middleware in Eleventy Dev Server (uses [eleventy-plugin-vite](https://github.com/11ty/eleventy-plugin-vite/)) * Eleventy build output is post-processed by [Vite](https://vitejs.dev) (with Rollup) * CSS/Sass post-processing with PostCSS incl. [Autoprefixer](https://github.com/postcss/autoprefixer) and cssnano * Uses [my own opinionated CSS/Sass structure](https://matthiasott.com/notes/how-i-structure-my-css) * Critical CSS, generated and inlined via [rollup-plugin-critical](https://github.com/nystudio107/rollup-plugin-critical). The main CSS file is then loaded asynchronously with [Scott Jehl’s `media` loading strategy](https://www.filamentgroup.com/lab/load-css-simpler/) (adds `media="print"` and swaps to `media="all"` once loaded) * Example implementation of a web font loading strategy ([critical FOFT with preload](https://www.zachleat.com/web/comprehensive-webfonts/#critical-foft-preload)) * Basic fluid typography based on [Utopia](https://utopia.fyi) * Basic dark mode support (using `prefers-color-scheme` and CSS Custom Properties) * Polyfill for [focus-visible](https://matthiasott.com/notes/focus-visible-is-here) * RSS feed 🧡 * XML sitemap * Four Hundos Lighthouse score 💯💯💯💯 ## Getting started Start by [generating a new repository based on this project](https://github.com/matthiasott/eleventy-plus-vite/generate). After cloning (or downloading) the repository to your local machine, install all dependencies with the command ```sh npm install ``` ## Run dev server The project comes with Eleventy’s built-in development server. You can start the server with ```sh npm start ```` or ```sh npx @11ty/eleventy --serve ```` ## Build To trigger a production build, use ```sh npm run build ```` or ```sh npx @11ty/eleventy ``` ## Deploy a fork of this template to Netlify [](https://app.netlify.com/start/deploy?repository=https://github.com/matthiasott/eleventy-plus-vite) ## CSS By default, this starter project uses Sass with an opinionated folder structure. Feel free to replace this structure with your own. If you prefer to write standards-compliant, good old plain CSS, this is also supported. Nesting is then possible via the [PostCSS Nesting plugin](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting), following the [CSS Nesting specification](https://drafts.csswg.org/css-nesting-1/). [Autoprefixer](https://github.com/postcss/autoprefixer) adds necessary browser prefixes. The [browserslist](https://github.com/browserslist/browserslist) settings can be adjusted in `package.json`. ## Roadmap * Add more base styles and a demo page that shows example styles and components * Add a toggle button for the dark mode theme * More advanced base styles for modern CSS layout * Webmention/IndieWeb support ## Feedback Please provide feedback! 🤗 Ideally by [filing an issue here](https://github.com/matthiasott/eleventy-plus-vite/issues) – or via a pull request. ## Thank you! This starter project would not have been possible without the many great sites and projects I was able to learn from, use as inspiration, and shamelessly copy code from: * Zach Leatherman [zachleat.com](https://github.com/zachleat/zachleat.com) * Max Böck’s [Eleventastic](https://github.com/maxboeck/eleventastic) * Stephanie Eckles’s [11ty Netlify Jumpstart](https://github.com/5t3ph/11ty-netlify-jumpstart) * Miriam Suzanne [miriamsuzanne.com](https://www.miriamsuzanne.com)
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

eleventy-base-blog
A starter repository for a blog web site using the Eleventy static site generator.
Eleventy · 博客

eleventy-garden
:seedling: A starter site for building a mind garden with eleventy
Eleventy · 启动器

eleventastic
An Eleventy Starter Kit
Eleventy · 启动器

neat-starter
Starter Template for Netlify CMS, Eleventy, Alpine JS & Tailwind CSS
Eleventy · 启动器

Eleventy-Starter-Boilerplate
🚀 Eleventy Starter is production-ready with SEO-friendly for quickly starting a blog. ⚡ Built with Eleventy, …
Eleventy · 博客

vredeburg
A simple starter project to create a blog using Eleventy and Tailwind CSS
Eleventy · 博客
