@@ -15,16 +15,19 @@ import WasThisHelpful from "../components/WasThisHelpful.astro";
1515import Callout from " ../components/Callout.astro" ;
1616import BentoGrid from " ../components/patterns/BentoGrid.astro" ;
1717import { Markdown } from " @astropub/md" ;
18+ import type { LanguageContent } from " ../content" ;
1819
1920interface Props {
2021 id? : string | undefined ;
2122 title: string ;
2223 description? : string | undefined ;
2324 headings? : Heading [] | undefined ;
2425 fullWidthLayout: boolean ;
26+ language: LanguageContent ;
2527}
2628
27- const { id, title, description, headings, fullWidthLayout } = Astro .props ;
29+ const { id, title, description, headings, fullWidthLayout, language } =
30+ Astro .props ;
2831
2932const nav = await getRootNav ();
3033const product = productFromUrl (Astro .url );
@@ -61,6 +64,7 @@ function getEditHref(id: string): string {
6164 ) : (
6265 <docs-article class = " max-w-[92rem] w-full mx-auto flex justify-between" >
6366 <div
67+ { ... (language && { " data-pagefind-filter" : ` language:${language } ` })}
6468 data-sidebar-wrapper
6569 class = " hidden lg:block shadow-xl lg:shadow-none z-50 lg:z-30"
6670 >
@@ -83,9 +87,9 @@ function getEditHref(id: string): string {
8387
8488 <main
8589 data-pagefind-body
86- data-pagefind-filter = {
87- product ? ` productId:${product .id } ` : undefined
88- }
90+ { ... ( product && {
91+ " data-pagefind-filter " : ` productId:${product .id } ` ,
92+ }) }
8993 class = " prose prose-stone dark:prose-invert p-6 md:px-8 lg:pt-0 pb-10 w-full max-w-3xl xl:max-w-[49rem]"
9094 >
9195 { title === product ?.name ? (
0 commit comments