feat: add filter for omitting catalogue-specific tags

This commit is contained in:
Devin Haska 2024-02-19 01:28:57 -08:00
parent 783cdb24b0
commit d0450a8e0b
4 changed files with 12 additions and 2 deletions

View file

@ -78,11 +78,19 @@ const pluralize = (string, count = 0) => {
return pluralizeBase(string, count);
};
const filterCatalogueTags = (tags) => {
// In the case of catalogue items, the 0-index is "catalogue"
// and the 1-index is the catalogueType. We don't need to
// show those in the front-end.
return filter(tags, [tags[0], tags[1]]);
};
module.exports = {
allTagCounts,
allTags,
entries,
filter,
filterCatalogueTags,
formatDate,
keys,
minifyCss,