11import type { Metadata } from 'next' ;
2+ import { CookiesProvider } from 'next-client-cookies/server' ;
23import '@styles/app.scss' ;
34import { ClientLayout } from '@layouts/client/client-layout' ;
45import content from '@content/content' ;
56import { getBasePath } from '@utils/get-base-path' ;
6- import { CookiesProvider } from 'next-client-cookies/server' ;
77
8+ // https://nextjs.org/docs/app/api-reference/functions/generate-metadata#metadata-object
89export const metadata : Metadata = {
910 title : content . global . mainLayout . title ,
1011 description : content . global . mainLayout . description ,
12+ icons : {
13+ icon : {
14+ url : `${ getBasePath ( ) } /lib/assets/favicons/favicon-192x192.png` ,
15+ sizes : '192x192' ,
16+ } ,
17+ shortcut : {
18+ url : `${ getBasePath ( ) } /lib/assets/favicons/favicon.ico` ,
19+ type : 'image/x-icon' ,
20+ } ,
21+ apple : {
22+ url : `${ getBasePath ( ) } /lib/assets/favicons/apple-touch-icon-180x180.png` ,
23+ } ,
24+ other : [
25+ {
26+ rel : 'mask-icon' ,
27+ url : `${ getBasePath ( ) } /lib/assets/favicons/favicon.svg` ,
28+ color : '#005eb8' ,
29+ } ,
30+ ] ,
31+ } ,
32+ other : {
33+ 'msapplication-TileImage' : `${ getBasePath ( ) } /lib/assets/favicons/mediumtile-144x144.png` ,
34+ 'msapplication-TileColor' : '#005eb8' ,
35+ 'msapplication-square70x70logo' : `${ getBasePath ( ) } /lib/assets/favicons/smalltile-70x70.png` ,
36+ 'msapplication-square150x150logo' : `${ getBasePath ( ) } /lib/assets/favicons/mediumtile-150x150.png` ,
37+ 'msapplication-wide310x150logo' : `${ getBasePath ( ) } /lib/assets/favicons/widetile-310x150.png` ,
38+ 'msapplication-square310x310logo' : `${ getBasePath ( ) } /lib/assets/favicons/largetile-310x310.png` ,
39+ } ,
1140} ;
1241
1342export const dynamic = 'force-dynamic' ;
@@ -21,54 +50,9 @@ export default function RootLayout({
2150 < html lang = 'en' >
2251 < head >
2352 < script src = { `${ getBasePath ( ) } /lib/nhsuk-9.1.0.min.js` } defer />
24- < title > { content . global . mainLayout . title } </ title >
25- < link
26- rel = 'shortcut icon'
27- href = { `${ getBasePath ( ) } /lib/assets/favicons/favicon.ico` }
28- type = 'image/x-icon'
29- />
30- < link
31- rel = 'apple-touch-icon'
32- href = { `${ getBasePath ( ) } /lib/assets/favicons/apple-touch-icon-180x180.png` }
33- />
34- < link
35- rel = 'mask-icon'
36- href = { `${ getBasePath ( ) } /lib/assets/favicons/favicon.svg` }
37- color = '#005eb8'
38- />
39- < link
40- rel = 'icon'
41- sizes = '192x192'
42- href = { `${ getBasePath ( ) } /lib/assets/favicons/favicon-192x192.png` }
43- />
44- < meta
45- name = 'msapplication-TileImage'
46- content = { `${ getBasePath ( ) } /lib/assets/favicons/mediumtile-144x144.png` }
47- />
48- < meta name = 'msapplication-TileColor' content = '#005eb8' />
49- < meta
50- name = 'msapplication-square70x70logo'
51- content = { `${ getBasePath ( ) } /lib/assets/favicons/smalltile-70x70.png` }
52- />
53- < meta
54- name = 'msapplication-square150x150logo'
55- content = { `${ getBasePath ( ) } /lib/assets/favicons/mediumtile-150x150.png` }
56- />
57- < meta
58- name = 'msapplication-wide310x150logo'
59- content = { `${ getBasePath ( ) } /lib/assets/favicons/widetile-310x150.png` }
60- />
61- < meta
62- name = 'msapplication-square310x310logo'
63- content = { `${ getBasePath ( ) } /lib/assets/favicons/largetile-310x310.png` }
64- />
65- < script
66- type = 'text/javascript'
67- src = { `${ getBasePath ( ) } /lib/nhs-frontend-js-check.js` }
68- defer
69- />
7053 </ head >
7154 < body suppressHydrationWarning >
55+ < script src = { `${ getBasePath ( ) } /lib/nhs-frontend-js-check.js` } defer />
7256 < CookiesProvider >
7357 < ClientLayout > { children } </ ClientLayout >
7458 </ CookiesProvider >
0 commit comments