2025-02-13 02:28:59 +01:00
|
|
|
import * as path from 'node:path';
|
|
|
|
import * as fs from 'node:fs';
|
|
|
|
|
|
|
|
const conf = {
|
|
|
|
tags: "portfolio",
|
|
|
|
layout: "base.njk",
|
|
|
|
eleventyComputed: {
|
|
|
|
images(data) {
|
|
|
|
const dir = path.dirname(data.page.inputPath);
|
|
|
|
|
|
|
|
const images = fs.readdirSync(dir).filter(file => ['.png', '.jpg', '.jpeg', '.JPG'].includes(path.extname(file).toLowerCase())).map(image => `${data.page.url}${image}`);
|
|
|
|
|
|
|
|
return images;
|
|
|
|
},
|
2025-02-13 02:50:07 +01:00
|
|
|
data(data) { return data; },
|
2025-02-13 02:28:59 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
export default conf;
|