Format useAppHead
This commit is contained in:
parent
f72f4afba6
commit
992e94d3aa
1 changed files with 105 additions and 29 deletions
|
@ -17,55 +17,131 @@ export const useAppHead = (pageTitleChunk) => {
|
|||
|
||||
return useHead({
|
||||
htmlAttrs: {
|
||||
lang: 'fr'
|
||||
lang: 'fr',
|
||||
},
|
||||
title: pageTitle,
|
||||
meta: [
|
||||
/* Basic metadata */
|
||||
{charset: 'utf-8'},
|
||||
{name: 'viewport', content: 'width=device-width'},
|
||||
{
|
||||
charset: 'utf-8',
|
||||
},
|
||||
{
|
||||
name: 'viewport',
|
||||
content: 'width=device-width',
|
||||
},
|
||||
/* Name */
|
||||
{id: 'schema_name', itemprop: 'name', content: siteTitle},
|
||||
{
|
||||
id: 'schema_name',
|
||||
itemprop: 'name',
|
||||
content: siteTitle,
|
||||
},
|
||||
/* Description */
|
||||
{name: 'description', content: metaDescription},
|
||||
{id: 'schema_description', itemprop: 'description', content: metaDescription},
|
||||
{
|
||||
name: 'description',
|
||||
content: metaDescription,
|
||||
},
|
||||
{
|
||||
id: 'schema_description',
|
||||
itemprop: 'description',
|
||||
content: metaDescription,
|
||||
},
|
||||
/* Author */
|
||||
{name: 'author', content: siteTitle},
|
||||
{
|
||||
name: 'author',
|
||||
content: siteTitle,
|
||||
},
|
||||
/* Image */
|
||||
{id: 'schema_image', itemprop: 'image', content: metaImageUrl},
|
||||
{
|
||||
id: 'schema_image',
|
||||
itemprop: 'image',
|
||||
content: metaImageUrl,
|
||||
},
|
||||
/* Open Graph */
|
||||
{property: 'og:title', content: pageTitle},
|
||||
{property: 'og:description', content: metaDescription},
|
||||
{property: 'og:image', content: metaImageUrl},
|
||||
{property: 'og:image:width', content: '1200'},
|
||||
{property: 'og:image:height', content: '675'},
|
||||
{property: 'og:url', content: pageUrl},
|
||||
{property: 'og:type', content: 'website'},
|
||||
{
|
||||
property: 'og:title',
|
||||
content: pageTitle,
|
||||
},
|
||||
{
|
||||
property: 'og:description',
|
||||
content: metaDescription,
|
||||
},
|
||||
{
|
||||
property: 'og:image',
|
||||
content: metaImageUrl,
|
||||
},
|
||||
{
|
||||
property: 'og:image:width',
|
||||
content: '1200',
|
||||
},
|
||||
{
|
||||
property: 'og:image:height',
|
||||
content: '675',
|
||||
},
|
||||
{
|
||||
property: 'og:url',
|
||||
content: pageUrl,
|
||||
},
|
||||
{
|
||||
property: 'og:type',
|
||||
content: 'website',
|
||||
},
|
||||
/* Twitter Card */
|
||||
{name: 'twitter:card', content: 'summary_large_image'},
|
||||
{name: 'twitter:title', content: siteTitle},
|
||||
{name: 'twitter:description', content: metaDescription},
|
||||
{name: 'twitter:image', content: metaImageUrl}
|
||||
{
|
||||
name: 'twitter:card',
|
||||
content: 'summary_large_image',
|
||||
},
|
||||
{
|
||||
name: 'twitter:title',
|
||||
content: siteTitle,
|
||||
},
|
||||
{
|
||||
name: 'twitter:description',
|
||||
content: metaDescription,
|
||||
},
|
||||
{
|
||||
name: 'twitter:image',
|
||||
content: metaImageUrl,
|
||||
},
|
||||
],
|
||||
link: [
|
||||
/* Canonical URL */
|
||||
{rel: 'canonical', href: pageUrl},
|
||||
{
|
||||
rel: 'canonical',
|
||||
href: pageUrl,
|
||||
},
|
||||
/* Favicon */
|
||||
{rel: 'icon', sizes: 'any', href: 'favicon/paul-nicoue-favicon.ico'},
|
||||
{rel: 'icon', type: 'image/svg+xml', href: 'favicon/paul-nicoue-favicon.svg'},
|
||||
{rel: 'apple-touch-icon', href: 'favicon/paul-nicoue-apple-touch-icon.png'},
|
||||
{rel: 'manifest', href: 'favicon/paul-nicoue.webmanifest'}
|
||||
{
|
||||
rel: 'icon',
|
||||
sizes: 'any',
|
||||
href: 'favicon/paul-nicoue-favicon.ico',
|
||||
},
|
||||
{
|
||||
rel: 'icon',
|
||||
type: 'image/svg+xml',
|
||||
href: 'favicon/paul-nicoue-favicon.svg',
|
||||
},
|
||||
{
|
||||
rel: 'apple-touch-icon',
|
||||
href: 'favicon/paul-nicoue-apple-touch-icon.png',
|
||||
},
|
||||
{
|
||||
rel: 'manifest',
|
||||
href: 'favicon/paul-nicoue.webmanifest',
|
||||
},
|
||||
],
|
||||
style: [
|
||||
/* Schema */
|
||||
{itemscope: true, itemtype: 'https://schema.org/WebSite', itemref: 'schema_name schema_description schema_image'}
|
||||
{
|
||||
itemscope: true,
|
||||
itemtype: 'https://schema.org/WebSite',
|
||||
itemref: 'schema_name schema_description schema_image',
|
||||
},
|
||||
],
|
||||
script: [
|
||||
/* Umami tracking code */
|
||||
{
|
||||
children:
|
||||
`defer src="https://umami.paulnicoue.com/script.js" data-website-id="2df69370-61fb-424f-9719-d106f3e178b5"`
|
||||
}
|
||||
]
|
||||
children: `defer src="https://umami.paulnicoue.com/script.js" data-website-id="2df69370-61fb-424f-9719-d106f3e178b5"`,
|
||||
},
|
||||
],
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue