From fdfbca03cdaf2d6e547079a1c4bfbfb55bcaf31f Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Fri, 27 Dec 2024 01:26:01 +0800 Subject: [PATCH] Fix widget catalog category pages being empty due to liquidjs regression (#11549) A regression to `break` in the latest liquidjs release caused each category page's contents to not be rendered. This fixes this by instead relying on the built-in `find` filter which is simpler and works in versions with and without the behavior change. Fixes https://github.com/flutter/website/issues/11533 Fixes https://github.com/flutter/website/issues/11534 Fixes https://github.com/flutter/website/issues/11535 Fixes https://github.com/flutter/website/issues/11536 Fixes https://github.com/flutter/website/issues/11537 Fixes https://github.com/flutter/website/issues/11538 Fixes https://github.com/flutter/website/issues/11539 Fixes https://github.com/flutter/website/issues/11540 Fixes https://github.com/flutter/website/issues/11541 Fixes https://github.com/flutter/website/issues/11543 Fixes https://github.com/flutter/website/issues/11547 Fixes https://github.com/flutter/website/issues/11548 Fixes https://github.com/flutter/website/issues/11550 Fixes https://github.com/flutter/website/issues/11551 --- src/_includes/docs/catalog-page-material.md | 7 +------ src/_includes/docs/catalog-page.md | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/_includes/docs/catalog-page-material.md b/src/_includes/docs/catalog-page-material.md index a9c14e8068..8df5a208b3 100644 --- a/src/_includes/docs/catalog-page-material.md +++ b/src/_includes/docs/catalog-page-material.md @@ -1,9 +1,4 @@ -{% for section in catalog.index %} - {% if section.name == categoryName %} - {% assign category = section %} - {% break %} - {% endif %} -{% endfor %} +{% assign category = catalog.index | find: "name", categoryName %} {% if category.subcategories -%} {% for sub in category.subcategories -%} diff --git a/src/_includes/docs/catalog-page.md b/src/_includes/docs/catalog-page.md index 2832efbbb3..6aff325523 100644 --- a/src/_includes/docs/catalog-page.md +++ b/src/_includes/docs/catalog-page.md @@ -1,9 +1,4 @@ -{% for section in catalog.index %} - {% if section.name == categoryName %} - {% assign category = section %} - {% break %} - {% endif %} -{% endfor %} +{% assign category = catalog.index | find: "name", categoryName %} {{category.description}}