代码拉取完成,页面将自动刷新
"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
};
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。