Skip to content

Commit

Permalink
Add /ui exception for mini-toc generation (flutter#9164)
Browse files Browse the repository at this point in the history
This allows index pages linked to from the breadcrumbs to be generated
properly, such as the text index page. They were empty since the
generation didn't account for `/ui` having multiple entries in the
sidenav.
  • Loading branch information
parlough committed Jul 31, 2023
1 parent a9b4035 commit 9ef9389
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/_layouts/toc.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
toc: false
sitemap: false
---

{% assign url = page.url | regex_replace: '/index$|/index.html$|/$' -%}
Expand All @@ -17,7 +18,7 @@
{% else -%}
{% assign path = path | append: '/' | append: path_part -%}
{% endif -%}
{% if forloop.index0 > 0 -%}
{% if forloop.index0 > 0 and path != '/ui' -%}
{% assign topics = topics | where: "permalink", path -%}
{% assign topics = topics[0].children | where_exp:"item", "item != 'divider'" -%}
{% endif -%}
Expand Down
2 changes: 1 addition & 1 deletion src/ui/design/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: toc
title: Design
title: Design & theming
description: Content covering designing Flutter apps.
sitemap: false
---
1 change: 0 additions & 1 deletion src/ui/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: toc
title: Building user interfaces with Flutter
short-title: UI
description: Introduction to user interface development in Flutter.
Expand Down
1 change: 1 addition & 0 deletions src/ui/interactivity/gestures/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Taps, drags, and other gestures
short-title: Gestures
description: How gestures, such as taps and drags, work in Flutter.
---

Expand Down

0 comments on commit 9ef9389

Please sign in to comment.