Compare commits

..

No commits in common. "95d0a937097548957be95d67546afa4ba9d7a289" and "b929fb7225392840eeaa029b207b21c7a52dad1a" have entirely different histories.

3 changed files with 3 additions and 37 deletions

View file

@ -34,29 +34,6 @@ module.exports = function (eleventyConfig, { TIME_ZONE, defaultLanguage }) {
return filtered;
});
// takes all collections and returns only the tags not matched
// key-objects so may repurpose under different name
eleventyConfig.addFilter("exclude_collections", function (collections, ...keysToExclude) {
if (!collections || typeof collections !== "object") {
console.warn("[exclude_collections] Invalid collections input:", collections);
return collections;
}
const result = {};
Object.keys(collections).forEach(key => {
if (!keysToExclude.includes(key)) {
result[key] = collections[key];
}
});
if (process.env.LOCALE_URL_DEBUG === "1" || process.env.LOCALE_URL_DEBUG === "true") {
console.warn("[excludeCollections] Excluded keys:", keysToExclude);
console.warn("[excludeCollections] Resulting keys:", Object.keys(result));
}
return result;
});
const LOCALE_URL_DEBUG = process.env.LOCALE_URL_DEBUG === "1" || process.env.LOCALE_URL_DEBUG === "true";
// locale_url replacement that uses pre-compile filesystem
@ -152,7 +129,6 @@ module.exports = function (eleventyConfig, { TIME_ZONE, defaultLanguage }) {
return fallback2;
});
// turn on disabled nunjucks filters
eleventyConfig.addFilter("keys", obj => Object.keys(obj));
eleventyConfig.addFilter("values", obj => Object.values(obj));
// turn on disabled nunjucks filter
eleventyConfig.addNunjucksFilter("values", obj => Object.values(obj));
};

View file

@ -1,8 +0,0 @@
<div class="tag-list-wrapper box">
<h2>tags</h2>
<ul class="tag-list">
{% for tag, posts in collections | exclude_collections("reviews", "all") %}
<li class="tag-item"><p>{{ tag | i18n }} ({{ posts | i18n_filter | length }})</p></li>
{% endfor %}
</ul>
</div>

View file

@ -5,8 +5,6 @@
}
],
"settings": {
"liveServer.settings.root": "/_site/",
"liveServer.settings.host": "yuki.last.fm",
"liveServer.settings.port": 80
"liveServer.settings.root": "/_site/"
}
}