restructured to public folder

This commit is contained in:
Luca 2024-11-04 17:50:27 +01:00
parent 43addb92a2
commit 83737bd3a6
101 changed files with 2945 additions and 8373 deletions

34
eleventy.config.js Normal file
View file

@ -0,0 +1,34 @@
/** @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);
});
}