File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,18 @@ filtered.entries = filtered.entries.sort(sortGroup);
152152
153153filtered .entries [0 ].label = " Overview" ;
154154
155- const lookupProductTitle = async (product : string ) => {
155+ const lookupProductTitle = async (slug : string ) => {
156+ const segments = slug .split (" /" );
157+ const product = segments [0 ];
158+
159+ if (product === " learning-paths" ) {
160+ const path = segments [1 ];
161+
162+ const { data } = await getEntry (" learning-paths" , path );
163+
164+ return ` ${data .title } (Learning Paths) ` ;
165+ }
166+
156167 const { data } = await getEntry (" products" , product );
157168
158169 return data .product .title ;
@@ -164,8 +175,10 @@ const lookupProductTitle = async (product: string) => {
164175 class =" items-center flex hover:opacity-80 decoration-accent-200"
165176>
166177 <AstroIcon name ={ currentSection } class =" text-accent-200 text-4xl mr-2" />
167- <h3 class =" text-black dark:text-white" >
168- { lookupProductTitle (currentSection )}
169- </h3 >
178+ <span class =" text-black dark:text-white" >
179+ <strong >
180+ { lookupProductTitle (slug )}
181+ </strong >
182+ </span >
170183</a >
171184<Default {... Astro .props } sidebar ={ filtered .entries } ><slot /></Default >
You can’t perform that action at this time.
0 commit comments