Format eleventy config with prettier
This commit is contained in:
40
.eleventy.js
40
.eleventy.js
@@ -3,35 +3,45 @@ module.exports = function (eleventyConfig) {
|
|||||||
eleventyConfig.addPassthroughCopy("./src/assets");
|
eleventyConfig.addPassthroughCopy("./src/assets");
|
||||||
eleventyConfig.addPassthroughCopy("./src/scripts");
|
eleventyConfig.addPassthroughCopy("./src/scripts");
|
||||||
|
|
||||||
eleventyConfig.addFilter('findAssociation', function (entries, associatedEntry) {
|
eleventyConfig.addFilter(
|
||||||
|
"findAssociation",
|
||||||
|
function (entries, associatedEntry) {
|
||||||
return entries.filter(function (entry) {
|
return entries.filter(function (entry) {
|
||||||
return entry.data.associatedEntry == associatedEntry;
|
return entry.data.associatedEntry == associatedEntry;
|
||||||
});
|
});
|
||||||
})
|
},
|
||||||
|
);
|
||||||
|
|
||||||
eleventyConfig.addCollection('professionalExperience', (collection) => {
|
eleventyConfig.addCollection("professionalExperience", (collection) => {
|
||||||
return collection
|
return collection
|
||||||
.getFilteredByGlob('./src/portfolio/professionalExperience/*.md')
|
.getFilteredByGlob("./src/portfolio/professionalExperience/*.md")
|
||||||
.sort((a, b) => (Number(a.data.displayOrder) < Number(b.data.displayOrder) ? 1 : -1));
|
.sort((a, b) =>
|
||||||
|
Number(a.data.displayOrder) < Number(b.data.displayOrder) ? 1 : -1,
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
eleventyConfig.addCollection('education', (collection) => {
|
eleventyConfig.addCollection("education", (collection) => {
|
||||||
return collection
|
return collection
|
||||||
.getFilteredByGlob('./src/portfolio/education/*.md')
|
.getFilteredByGlob("./src/portfolio/education/*.md")
|
||||||
.sort((a, b) => (Number(a.data.displayOrder) < Number(b.data.displayOrder) ? 1 : -1));
|
.sort((a, b) =>
|
||||||
|
Number(a.data.displayOrder) < Number(b.data.displayOrder) ? 1 : -1,
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
eleventyConfig.addCollection("highlights", (collection) => {
|
||||||
eleventyConfig.addCollection('highlights', (collection) => {
|
|
||||||
return collection
|
return collection
|
||||||
.getFilteredByGlob('./src/portfolio/highlights/*.md')
|
.getFilteredByGlob("./src/portfolio/highlights/*.md")
|
||||||
.sort((a, b) => (Number(a.data.displayOrder) > Number(b.data.displayOrder) ? 1 : -1));
|
.sort((a, b) =>
|
||||||
|
Number(a.data.displayOrder) > Number(b.data.displayOrder) ? 1 : -1,
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
eleventyConfig.addCollection('software', (collection) => {
|
eleventyConfig.addCollection("software", (collection) => {
|
||||||
return collection
|
return collection
|
||||||
.getFilteredByGlob('./src/personal/software/*.md')
|
.getFilteredByGlob("./src/personal/software/*.md")
|
||||||
.sort((a, b) => (Number(a.data.displayOrder) > Number(b.data.displayOrder) ? 1 : -1));
|
.sort((a, b) =>
|
||||||
|
Number(a.data.displayOrder) > Number(b.data.displayOrder) ? 1 : -1,
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Reference in New Issue
Block a user