Skip to content

Commit 62a119a

Browse files
authored
Consolidate the testing page with recipes from the cookbook. (#2380)
1 parent 96afb9b commit 62a119a

File tree

3 files changed

+79
-309
lines changed

3 files changed

+79
-309
lines changed

.firebaserc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"kw": "kw-flutter-1",
1111
"kw2": "kw-flutter-2",
1212
"ft": "flutter-web-staging",
13-
"filip": "flutter-website-filiph-staging"
13+
"filip": "flutter-website-filiph-staging",
14+
"brianegan": "brianegan-flutter-staging"
1415
}
15-
}
16+
}

src/_includes/testing_toc.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{% comment %}
2+
Generates a list of testing recipes for the given type. The type corresponds
3+
to the name of the directory under cookbook/testing/*.
4+
5+
Usage: {% include testing_toc.md type='unit' %}
6+
{% endcomment -%}
7+
8+
{% assign dir = 'cookbook/testing/' | append: include.type %}
9+
10+
{% assign recipes = site.pages | where_exp:"item", "item.dir contains dir" | sort: 'title' %}
11+
12+
{% for recipe in recipes -%}
13+
{% comment %}
14+
Exclude index pages (all other pages will end in `.html`).
15+
{% endcomment -%}
16+
{% if recipe.url contains '.html' -%}
17+
- [{{ recipe.title }}]({{ recipe.url }})
18+
{% endif -%}
19+
{% endfor %}

0 commit comments

Comments
 (0)