Skip to content

Commit 7bfd991

Browse files
authored
fix: Ignore versioned pages in PageGrid (#13199)
1 parent 05e78a6 commit 7bfd991

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/pageGrid.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Link from 'next/link';
55
import {DocNode, nodeForPath} from 'sentry-docs/docTree';
66
import {serverContext} from 'sentry-docs/serverContext';
77
import {isNotNil, sortPages} from 'sentry-docs/utils';
8+
import {isVersioned} from 'sentry-docs/versioning';
89

910
type Props = {
1011
exclude?: string[];
@@ -34,7 +35,8 @@ export function PageGrid({header, exclude}: Props) {
3435
c =>
3536
!c.frontmatter.sidebar_hidden &&
3637
c.frontmatter.title &&
37-
!exclude?.includes(c.slug)
38+
!exclude?.includes(c.slug) &&
39+
!isVersioned(c.slug)
3840
),
3941
// a hacky adapter to reuse the same sidebar sorter
4042
node => ({...node, context: node.frontmatter})

0 commit comments

Comments
 (0)