Format eleventy config with prettier
This commit is contained in:
46
.eleventy.js
46
.eleventy.js
@@ -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 {
|
||||
|
Reference in New Issue
Block a user