From f3cc9a28ea0788f04f0db257870fa94c9252edc1 Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Tue, 17 May 2022 16:26:21 -0500 Subject: [PATCH] =?UTF-8?q?Add=20=E2=80=9CBenchmarks=E2=80=9D=20to=20bench?= =?UTF-8?q?mark=20results=20title?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- helpers/stork/toml.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/helpers/stork/toml.js b/helpers/stork/toml.js index ee68fbb..9a0de03 100644 --- a/helpers/stork/toml.js +++ b/helpers/stork/toml.js @@ -68,13 +68,20 @@ function mapSitemapEndpointsToToml ( sitemap ) { route } = sitemapEntry + const routeType = getRouteType( route ) + // console.log( 'payload', route, payload ) const listing = payload.app || payload.listing || payload.video || {} const contents = makeDetailsFromListing({ listing, route }) - const title = listing.name || route + let title = listing.name || route + + // If this route is a benchmark route, add the benchmark name + if ( routeType === 'benchmarks' ) { + title = `${ title } Benchmarks` + } // console.log( 'listing', listing ) // console.log( 'contents', contents ) @@ -115,8 +122,6 @@ function mapSitemapEndpointsToToml ( sitemap ) { export async function writeStorkToml ( sitemap ) { - - const indexToml = mapSitemapEndpointsToToml( sitemap ) // Build Stork Index TOML