@@ -28,7 +28,7 @@ const exportServiceUrlInternal =
28
28
const distributorText =
29
29
process . env . DISTRIBUTOR_TEXT ??
30
30
'This website is hosted and distributed by ...' ;
31
- const distributorUrl = process . env . DISTRIBUTOR_URL ?? '... ' ;
31
+ const distributorUrl = process . env . DISTRIBUTOR_URL ?? '' ;
32
32
33
33
console . log ( '\n' ) ;
34
34
console . log ( 'isProduction' , process . env . NODE_ENV === 'production' ) ;
@@ -284,14 +284,15 @@ baseRouter.use(/(.*)/, async (req: Request, res: Response) => {
284
284
} ) ;
285
285
286
286
const noFollowLinksMeta = `<meta name="robots" content="nofollow"></meta>` ;
287
- const googleSearchConsoleMeta = `<meta name="google-site-verification" content="${ googleSearchConsoleKey } "></meta>` ;
288
287
rendered . head = rendered . head
289
- ? rendered . head
290
- . concat ( '\n' )
291
- . concat ( noFollowLinksMeta )
292
- . concat ( '\n' )
293
- . concat ( googleSearchConsoleMeta )
294
- : noFollowLinksMeta . concat ( '\n' ) . concat ( googleSearchConsoleMeta ) ;
288
+ ? rendered . head . concat ( '\n\t' ) . concat ( noFollowLinksMeta )
289
+ : noFollowLinksMeta ;
290
+ if ( googleSearchConsoleKey && googleSearchConsoleKey . trim ( ) . length > 0 ) {
291
+ const googleSearchConsoleMeta = `<meta name="google-site-verification" content="${ googleSearchConsoleKey } "></meta>` ;
292
+ rendered . head = rendered . head
293
+ ? rendered . head . concat ( '\n\t' ) . concat ( googleSearchConsoleMeta )
294
+ : googleSearchConsoleMeta ;
295
+ }
295
296
296
297
const pageRoute = path . replace ( baseUrl , '' ) ;
297
298
if (
@@ -302,7 +303,7 @@ baseRouter.use(/(.*)/, async (req: Request, res: Response) => {
302
303
if ( metadata ) {
303
304
const metadataScript = `<script type="application/ld+json">${ metadata } </script>` ;
304
305
rendered . head = rendered . head
305
- ? rendered . head . concat ( '\n' ) . concat ( metadataScript )
306
+ ? rendered . head . concat ( '\n\t ' ) . concat ( metadataScript )
306
307
: metadataScript ;
307
308
}
308
309
}
0 commit comments