Format eleventy config with prettier

This commit is contained in:
Sravan Balaji
2025-01-04 22:11:33 -05:00
parent 041164f1d2
commit c8cf9dd738

View File

@@ -3,35 +3,45 @@ module.exports = function (eleventyConfig) {
eleventyConfig.addPassthroughCopy("./src/assets");
eleventyConfig.addPassthroughCopy("./src/scripts");
eleventyConfig.addFilter('findAssociation', function (entries, associatedEntry) {
return entries.filter(function(entry) {
return entry.data.associatedEntry == associatedEntry;
});
})
eleventyConfig.addFilter(
"findAssociation",
function (entries, associatedEntry) {
return entries.filter(function (entry) {
return entry.data.associatedEntry == associatedEntry;
});
},
);
eleventyConfig.addCollection('professionalExperience', (collection) => {
eleventyConfig.addCollection("professionalExperience", (collection) => {
return collection
.getFilteredByGlob('./src/portfolio/professionalExperience/*.md')
.sort((a, b) => (Number(a.data.displayOrder) < Number(b.data.displayOrder) ? 1 : -1));
.getFilteredByGlob("./src/portfolio/professionalExperience/*.md")
.sort((a, b) =>
Number(a.data.displayOrder) < Number(b.data.displayOrder) ? 1 : -1,
);
});
eleventyConfig.addCollection('education', (collection) => {
eleventyConfig.addCollection("education", (collection) => {
return collection
.getFilteredByGlob('./src/portfolio/education/*.md')
.sort((a, b) => (Number(a.data.displayOrder) < Number(b.data.displayOrder) ? 1 : -1));
.getFilteredByGlob("./src/portfolio/education/*.md")
.sort((a, b) =>
Number(a.data.displayOrder) < Number(b.data.displayOrder) ? 1 : -1,
);
});
eleventyConfig.addCollection('highlights', (collection) => {
eleventyConfig.addCollection("highlights", (collection) => {
return collection
.getFilteredByGlob('./src/portfolio/highlights/*.md')
.sort((a, b) => (Number(a.data.displayOrder) > Number(b.data.displayOrder) ? 1 : -1));
.getFilteredByGlob("./src/portfolio/highlights/*.md")
.sort((a, b) =>
Number(a.data.displayOrder) > Number(b.data.displayOrder) ? 1 : -1,
);
});
eleventyConfig.addCollection('software', (collection) => {
eleventyConfig.addCollection("software", (collection) => {
return collection
.getFilteredByGlob('./src/personal/software/*.md')
.sort((a, b) => (Number(a.data.displayOrder) > Number(b.data.displayOrder) ? 1 : -1));
.getFilteredByGlob("./src/personal/software/*.md")
.sort((a, b) =>
Number(a.data.displayOrder) > Number(b.data.displayOrder) ? 1 : -1,
);
});
return {