Files
jiu/web/.eleventy.js
T
wangjia d1260e8258 refactor(web): features 页改为 njk 模板,接入 base.njk 统一导航页脚
- inventory.html / approval.html → .njk,使用 layout: base.njk
- 内联 CSS 提取为独立文件 assets/features-{name}.css(pageExtraCss 加载)
- 移除各自硬编码的 nav/footer/script,改由 nav.njk、footer.njk、nav.js 统一提供
- permalink 保持 /features/*.html,现有链接无需修改
- .eleventy.js 移除 features/ passthrough

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-07 22:05:35 +08:00

23 lines
596 B
JavaScript

module.exports = function(cfg) {
// 静态资源直接复制
cfg.addPassthroughCopy("assets");
// scan.html 面向消费者,独立维护,直接复制不经模板
cfg.addPassthroughCopy("scan.html");
// features/ 已改为 .njk 模板,不再需要 passthrough
return {
dir: {
input: ".",
output: "dist",
includes: "_includes",
data: "_data",
layouts: "_includes",
},
// 同时支持 .html 和 .njk 作为模板格式
templateFormats: ["njk", "html", "md"],
htmlTemplateEngine: "njk",
markdownTemplateEngine: "njk",
};
};