1 Star 0 Fork 0

任跃兵/polyfill-service

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.eleventy.js 970 Bytes
一键复制 编辑 原始数据 按行查看 历史
jake champion 提交于 2021-03-29 23:21 . commit changes from npm run fmt
"use strict";
const glob = require('fast-glob');
const path = require('path');
/**
* The @11ty/eleventy configuration.
*
* For a full list of options, see: https://www.11ty.io/docs/config/
*/
module.exports = (eleventyConfig) => {
const directories = {
input: "./src/assets/",
data: `../data/`,
includes: `../includes/`,
output: "./dist/"
}
const files = glob.sync(path.join(process.cwd(), directories.input, "**/*"), { ignore: ['**/node_modules/**'] });
const extensions = files.map(file => path.extname(file).replace('.', ''));
// Make all files pass through to output folder
eleventyConfig.setTemplateFormats(extensions);
return {
pathPrefix: "/v3",
// Set the src and output directories
dir: directories,
// Set the default template engine from `liquid` to `njk`
htmlTemplateEngine: "njk",
markdownTemplateEngine: "njk",
dataTemplateEngine: "njk",
// Set up eleventy to pass-through files
passthroughFileCopy: true
};
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cnryb/polyfill-service.git
git@gitee.com:cnryb/polyfill-service.git
cnryb
polyfill-service
polyfill-service
master

搜索帮助