portfolio content, styling
Some checks failed
Build / Deploy (push) Failing after 2m24s
Some checks failed
Build / Deploy (push) Failing after 2m24s
This commit is contained in:
parent
afcdd8ed12
commit
2d182e6391
70 changed files with 367 additions and 120 deletions
|
@ -3,12 +3,16 @@ import * as fs from 'node:fs';
|
|||
|
||||
const conf = {
|
||||
tags: "portfolio",
|
||||
layout: "base.njk",
|
||||
layout: "portfolio.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}`);
|
||||
const images = fs.readdirSync(dir)
|
||||
.filter(file => ['.png', '.jpg', '.jpeg', '.JPG'].includes(path.extname(file)))
|
||||
.sort()
|
||||
.map(image => `${data.page.url}${image}`);
|
||||
console.log(images);
|
||||
|
||||
return images;
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue