34 lines
1.1 KiB
JavaScript
34 lines
1.1 KiB
JavaScript
/** @param {import("@11ty/eleventy").UserConfig} eleventyConfig */
|
|
export default function (eleventyConfig) {
|
|
// Folder configuration
|
|
eleventyConfig.setInputDirectory('content');
|
|
eleventyConfig.setIncludesDirectory('../_includes'); // relative to the input directory, therefore the ../
|
|
eleventyConfig.setOutputDirectory('_site');
|
|
|
|
// Ignores
|
|
eleventyConfig.ignores.add('node_modules');
|
|
eleventyConfig.ignores.add('README.md');
|
|
eleventyConfig.ignores.add('public/images/original/');
|
|
|
|
// Passthroughs
|
|
eleventyConfig.addPassthroughCopy('content/pwa.webmanifest');
|
|
eleventyConfig.addPassthroughCopy('content/css/*.css');
|
|
|
|
// TODO: Figure out how to prevent public/images/original from syncing
|
|
eleventyConfig.addPassthroughCopy({ 'public/': '/' });
|
|
|
|
eleventyConfig.setFrontMatterParsingOptions({
|
|
excerpt: true,
|
|
// Optional, default is "---"
|
|
excerpt_separator: '<!-- excerpt -->',
|
|
});
|
|
|
|
// Custom date filter
|
|
eleventyConfig.addFilter('formatDate', (dateObj) => {
|
|
return new Intl.DateTimeFormat('de-DE', {
|
|
day: 'numeric',
|
|
month: 'long',
|
|
year: 'numeric',
|
|
}).format(dateObj);
|
|
});
|
|
}
|