Update to Eleventy v3 #11
1 changed files with 0 additions and 8 deletions
|
@ -29,14 +29,6 @@ export const organizeByDate = (collection) => {
|
||||||
return collectionByDate;
|
return collectionByDate;
|
||||||
};
|
};
|
||||||
|
|
||||||
const allTags = (collection, ignore = []) => {
|
|
||||||
const tagSet = new Set(collection.flatMap((item) => item.data.tags));
|
|
||||||
|
|
||||||
ignore.forEach((tag) => tagSet.delete(tag));
|
|
||||||
|
|
||||||
return [...tagSet];
|
|
||||||
};
|
|
||||||
|
|
||||||
export const allTagCounts = (collection, ignore = ["post"]) => {
|
export const allTagCounts = (collection, ignore = ["post"]) => {
|
||||||
if (!collection.length) {
|
if (!collection.length) {
|
||||||
throw new Error("Invalid collection, no items");
|
throw new Error("Invalid collection, no items");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue