50 lines
1.6 KiB
JavaScript
50 lines
1.6 KiB
JavaScript
import { inspect } from "util";
|
|
import pluginIcons from 'eleventy-plugin-icons';
|
|
import eleventyPDF from "./_config/eleventy-plugin-pdf.js";
|
|
|
|
export default async function (eleventyConfig) {
|
|
eleventyConfig.setUseGitIgnore(false);
|
|
|
|
eleventyConfig.addPassthroughCopy({"./src/_includes/js/" : "/js"});
|
|
|
|
eleventyConfig.addLayoutAlias('base', 'layouts/base.html');
|
|
eleventyConfig.addLayoutAlias('pdf', 'layouts/pdf.html');
|
|
|
|
eleventyConfig.addCollection("sections", (collectionApi) => {
|
|
const sections = collectionApi.getFilteredByGlob("./src/pages/sections/**")
|
|
.sort((a, b) => a.data.order - b.data.order);
|
|
process.env.DEBUG && console.log(inspect(sections));
|
|
return sections;
|
|
});
|
|
eleventyConfig.addCollection("projects", (collectionApi) => {
|
|
const projects = collectionApi.getFilteredByGlob("./src/projects/**")
|
|
.sort((a, b) => a.data.order - b.data.order);
|
|
process.env.DEBUG && console.log(inspect(projects));
|
|
return projects;
|
|
});
|
|
|
|
eleventyConfig.addCollection('experiences', collection => {
|
|
return [...collection.getFilteredByGlob('./src/experiences/*.md')]
|
|
.sort((a, b) => a.data.startDate - b.data.startDate).reverse();
|
|
});
|
|
|
|
eleventyConfig.addPlugin(eleventyPDF);
|
|
|
|
eleventyConfig.addPassthroughCopy('src/favicon.ico')
|
|
|
|
eleventyConfig.addPlugin(pluginIcons, {
|
|
sources: [{ name: 'lucide', path: 'node_modules/lucide-static/icons', default: true }]
|
|
});
|
|
|
|
eleventyConfig.addBundle("css");
|
|
|
|
return {
|
|
markdownTemplateEngine: 'liquid',
|
|
dataTemplateEngine: 'liquid',
|
|
htmlTemplateEngine: 'liquid',
|
|
dir: {
|
|
input: 'src',
|
|
output: 'dist'
|
|
}
|
|
};
|
|
}; |