Skip to content

Commit

Permalink
Show caret to expand FAQ on sidebar, but not for sub-sections (#1911)
Browse files Browse the repository at this point in the history
* expand FAQ on sidebar, but not sub-sections

Signed-off-by: deepthi <[email protected]>

* use .Pages instead of .RegularPages to decide whether there are any children

Signed-off-by: deepthi <[email protected]>

---------

Signed-off-by: deepthi <[email protected]>
  • Loading branch information
deepthi authored Dec 31, 2024
1 parent 1c0d6ae commit 9e7d730
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion content/en/docs/faq/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
title: FAQ
description: Frequently Asked Questions about Vitess
weight: 2900
docs_nav_disable_expand: true
cascade:
skipversions: true
aliases: ['/docs/user-guides/faq/']
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/faq/advanced-configuration/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Advanced Configuration
docs_nav_disable_expand: false
docs_nav_disable_expand: true
weight: 10
---

2 changes: 1 addition & 1 deletion content/en/docs/faq/getting-started/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Getting Started
docs_nav_disable_expand: false
docs_nav_disable_expand: true
weight: 1
---

2 changes: 1 addition & 1 deletion content/en/docs/faq/migrating/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Migrating
docs_nav_disable_expand: false
docs_nav_disable_expand: true
weight: 2
---

2 changes: 1 addition & 1 deletion content/en/docs/faq/operating-vitess/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Operating Vitess
docs_nav_disable_expand: false
docs_nav_disable_expand: true
weight: 3
---

2 changes: 1 addition & 1 deletion content/en/docs/faq/sharding/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Sharding
docs_nav_disable_expand: false
docs_nav_disable_expand: true
weight: 5
---

2 changes: 1 addition & 1 deletion content/en/docs/faq/troubleshooting/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Troubleshooting
docs_nav_disable_expand: false
docs_nav_disable_expand: true
weight: 4
---

2 changes: 1 addition & 1 deletion layouts/partials/docs/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{{/* 'docs_nav_disable_expand' is (currently only) used to hide the caret on the "Older Version Docs" link */}}
{{/* We can remove it with a better versioning system: see https://github.com/vitessio/website/issues/625 */}}
{{ $isExpandable := and .IsSection (not .Params.docs_nav_disable_expand) }}
{{ $isExpandable := and $isExpandable (gt (len .RegularPages) 0) }}
{{ $isExpandable := and $isExpandable (gt (len .Pages) 0) }}
{{ $expandableClass := cond $isExpandable "expandable" "" }}

<li class="{{ $expandedClass }} {{ $activeClass }}">
Expand Down

0 comments on commit 9e7d730

Please sign in to comment.