@@ -42,10 +42,10 @@ import InductionCookingContent, { type InductionLocale } from '../src/features/c
4242import ChineseCookingContent from '../src/features/commercial-kitchen/ChineseCookingContent' ;
4343import { hotCookingPath } from '../src/features/commercial-kitchen/routes.mjs' ;
4444import { inductionPage , getInductionPage , inductionPageSchema , zhHotCookingPage , chineseCookingSchema } from '../src/features/commercial-kitchen/data/inductionPage.mjs' ;
45- import SteamCabinetContent from '../src/features/commercial-kitchen/SteamCabinetContent ' ;
46- import { getSteamCabinetPage , steamCabinetSchema } from '../src/features/commercial-kitchen/data/steamCabinetPage .mjs' ;
47- import { steamCabinetPath } from '../src/features/commercial-kitchen/routes.mjs' ;
48- const steamCabinetRelPath = steamCabinetPath . slice ( 1 ) ;
45+ import CookingSelectionContent from '../src/features/commercial-kitchen/CookingSelectionContent ' ;
46+ import { cookingSelectionGroup , getCookingSelectionPage , cookingSelectionSchema } from '../src/features/commercial-kitchen/data/cookingSelectionPages .mjs' ;
47+ import { steamCabinetPath , noodleCookerPath } from '../src/features/commercial-kitchen/routes.mjs' ;
48+ const cookingSelectionRelPaths = [ steamCabinetPath , noodleCookerPath ] . map ( path => path . slice ( 1 ) ) ;
4949const inductionRelPath = inductionPage . path . slice ( 1 , - 1 ) ;
5050const hotCookingRelPath = hotCookingPath . slice ( 1 ) ;
5151import RefrigerationModelCatalogue from '../src/features/refrigeration/RefrigerationModelCatalogue' ;
@@ -1793,15 +1793,15 @@ function injectStaticRouteContent(
17931793 renderToStaticMarkup ( createElement ( CatalogueHeroMedia , { src :'/commercial-kitchen-media/kitchen-hero.webp' ,
17941794 alt :'Commercial kitchen application' , scene :true , items :kitchenHeroItems } ) ) ) ;
17951795 htmlContent = htmlContent . replace ( / < s c r i p t i d = " s c h e m a - j s o n l d - s t a t i c - p a g e " [ ^ > ] * > [ \s \S ] * ?< \/ s c r i p t > / , `<script id="schema-jsonld-static-page" type="application/ld+json">${ JSON . stringify ( kitchenStructuredData ( kitchenLaunch ) ) . replace ( / < / g, '\\u003c' ) } </script>` ) ;
1796- } else if ( relPath === inductionRelPath || relPath === hotCookingRelPath || relPath === steamCabinetRelPath ) {
1796+ } else if ( relPath === inductionRelPath || relPath === hotCookingRelPath || cookingSelectionRelPaths . includes ( relPath ) ) {
17971797 const hotCooking = relPath === hotCookingRelPath ;
1798- const steamCabinet = relPath === steamCabinetRelPath ;
1798+ const selectionGroup = cookingSelectionGroup ( '/' + relPath ) ;
17991799 const locale = ( lang === 'zh-cn' ? 'zh' : lang ) as InductionLocale ;
18001800 staticBody = hotCooking
18011801 ? renderToStaticMarkup ( createElement ( ChineseCookingContent , { page : zhHotCookingPage } ) )
1802- : steamCabinet ? renderToStaticMarkup ( createElement ( SteamCabinetContent , { locale } ) )
1802+ : selectionGroup ? renderToStaticMarkup ( createElement ( CookingSelectionContent , { group : selectionGroup , locale } ) )
18031803 : renderToStaticMarkup ( createElement ( InductionCookingContent , { locale } ) ) ;
1804- const schema = JSON . stringify ( hotCooking ? chineseCookingSchema ( zhHotCookingPage ) : steamCabinet ? steamCabinetSchema ( locale ) : inductionPageSchema ( locale ) ) . replace ( / < / g, '\\u003c' ) ;
1804+ const schema = JSON . stringify ( hotCooking ? chineseCookingSchema ( zhHotCookingPage ) : selectionGroup ? cookingSelectionSchema ( selectionGroup , locale ) : inductionPageSchema ( locale ) ) . replace ( / < / g, '\\u003c' ) ;
18051805 htmlContent = htmlContent . replace ( / < s c r i p t i d = " s c h e m a - j s o n l d - s t a t i c - p a g e " [ ^ > ] * > [ \s \S ] * ?< \/ s c r i p t > / g, '' ) ;
18061806 htmlContent = htmlContent . replace ( '</head>' , `<script id="schema-jsonld-static-page" type="application/ld+json">${ schema } </script></head>` ) ;
18071807 } else if ( kitchenCategories . some ( category => category . path === `/${ relPath } /` ) ) {
@@ -1964,7 +1964,7 @@ function run() {
19641964 ...mobilePages . map ( page => ( { path :page . path . slice ( 1 ) , priority :'0.9' , changefreq :'monthly' , languages :[ ...overviewLanguages ] } ) ) ,
19651965 ...[ 'screen-protectors' , 'screen-protectors/compare' ] . map ( path => ( { path, priority : '0.8' , changefreq : 'monthly' , languages : overviewLanguages . filter ( l => l !== 'en' ) } ) ) ,
19661966 ...buyerGuides . map ( guide => ( { path : guide . path . slice ( 1 ) , priority : '0.8' , changefreq : 'monthly' , languages : overviewLanguages } ) ) ,
1967- { path : steamCabinetRelPath , priority : '0.8' , changefreq : 'monthly' , languages : overviewLanguages } ,
1967+ ... cookingSelectionRelPaths . map ( path => ( { path, priority : '0.8' , changefreq : 'monthly' , languages : overviewLanguages } ) ) ,
19681968 { path : inductionRelPath , priority : '0.8' , changefreq : 'monthly' , languages : overviewLanguages } ,
19691969 { path : hotCookingRelPath , priority : '0.8' , changefreq : 'monthly' , languages : [ 'zh-cn' ] } ,
19701970 ...kitchenCategories . map ( category => ( { path : category . path . replace ( / ^ \/ | \/ $ / g, '' ) , priority : '0.8' , changefreq : 'monthly' , languages : overviewLanguages } ) ) ,
@@ -2088,8 +2088,9 @@ function run() {
20882088 const meta = buyerMeta ( buyerGuide , lang ) ;
20892089 seo = { title : meta . title , desc : meta . description , keywords : '' , image : meta . image } ;
20902090 }
2091- if ( entry . path === inductionRelPath || entry . path === hotCookingRelPath || entry . path === steamCabinetRelPath ) {
2092- const page = entry . path === hotCookingRelPath ? zhHotCookingPage : entry . path === steamCabinetRelPath ? getSteamCabinetPage ( lang ) : getInductionPage ( lang ) ;
2091+ if ( entry . path === inductionRelPath || entry . path === hotCookingRelPath || cookingSelectionRelPaths . includes ( entry . path ) ) {
2092+ const selectionGroup = cookingSelectionGroup ( '/' + entry . path ) ;
2093+ const page = entry . path === hotCookingRelPath ? zhHotCookingPage : selectionGroup ? getCookingSelectionPage ( selectionGroup , lang ) : getInductionPage ( lang ) ;
20932094 seo = { title : page . title , desc : page . description , keywords : '' , image : page . image } ;
20942095 }
20952096 const equipmentCategory = kitchenCategories . find ( category => category . path === `/${ entry . path } /` ) ;
0 commit comments