@@ -83,24 +83,6 @@ function normalizeGuidePath(path: string): string {
8383 : `/${ withoutLanguage || path } `
8484}
8585
86- /**
87- * Helper function to append the journey-navigation feature flag to URLs
88- */
89- function appendJourneyFeatureFlag ( href : string ) : string {
90- if ( ! href ) return href
91-
92- try {
93- // we have to pass some URL here, we just throw it away though
94- const url = new URL ( href , 'https://docs.github.com' )
95- url . searchParams . set ( 'feature' , 'journey-navigation' )
96- return url . pathname + url . search
97- } catch {
98- // fallback if URL parsing fails
99- const separator = href . includes ( '?' ) ? '&' : '?'
100- return `${ href } ${ separator } feature=journey-navigation`
101- }
102- }
103-
10486/**
10587 * Resolves the journey context for a given article path.
10688 *
@@ -189,7 +171,7 @@ export async function resolveJourneyContext(
189171 if ( resultData && resultData . length > 0 ) {
190172 const linkResult = resultData [ 0 ]
191173 result . prevGuide = {
192- href : appendJourneyFeatureFlag ( linkResult . href ) ,
174+ href : linkResult . href ,
193175 title : linkResult . title || '' ,
194176 }
195177 }
@@ -210,7 +192,7 @@ export async function resolveJourneyContext(
210192 if ( resultData && resultData . length > 0 ) {
211193 const linkResult = resultData [ 0 ]
212194 result . nextGuide = {
213- href : appendJourneyFeatureFlag ( linkResult . href ) ,
195+ href : linkResult . href ,
214196 title : linkResult . title || '' ,
215197 }
216198 }
@@ -251,7 +233,7 @@ export async function resolveJourneyTracks(
251233 const linkData = await getLinkData ( guidePath , context , { title : true } )
252234 const baseHref = linkData ?. [ 0 ] ?. href || guidePath
253235 return {
254- href : appendJourneyFeatureFlag ( baseHref ) ,
236+ href : baseHref ,
255237 title : linkData ?. [ 0 ] ?. title || 'Untitled Guide' ,
256238 }
257239 } ) ,
0 commit comments