Files
classroomio/apps/classroomio-com/src/routes/+layout.ts
T

52 lines
1.8 KiB
TypeScript
Raw Normal View History

2024-08-25 21:35:59 +01:00
import type { MetaTagsProps } from 'svelte-meta-tags';
2024-02-02 08:18:26 +01:00
export const prerender = true;
export function load({ url, data }) {
2024-02-02 08:18:26 +01:00
return {
2024-08-25 21:35:59 +01:00
baseMetaTags: getBaseMetaTags(url),
url: url.pathname,
...data,
2024-02-02 08:18:26 +01:00
};
}
2024-08-25 21:35:59 +01:00
function getBaseMetaTags(url: URL) {
const metatags = Object.freeze({
2024-10-07 01:36:07 +01:00
title: 'ClassroomIO | The Open Source Learning Management System for Companies',
2024-08-25 21:35:59 +01:00
description:
2024-10-07 01:36:07 +01:00
'A flexible, user-friendly platform for creating, managing, and delivering courses for companies and training organisations',
2024-08-25 21:35:59 +01:00
canonical: new URL(url.pathname, url.origin).href,
openGraph: {
type: 'website',
url: new URL(url.pathname, url.origin).href,
locale: 'en_IE',
2024-10-07 01:36:07 +01:00
title: 'ClassroomIO | The Open Source Learning Management System for Companies',
2024-08-25 21:35:59 +01:00
description:
2024-10-07 01:36:07 +01:00
'A flexible, user-friendly platform for creating, managing, and delivering courses for companies and training organisations',
2024-08-25 21:35:59 +01:00
siteName: 'ClassroomIO',
images: [
{
2024-09-05 15:51:05 +01:00
url: 'https://brand.cdn.clsrio.com/og/classroomio-og.png',
2024-08-25 21:35:59 +01:00
alt: 'ClassroomIO OG Image',
width: 1920,
height: 1080,
2024-09-05 15:51:05 +01:00
secureUrl: 'https://brand.cdn.clsrio.com/og/classroomio-og.png',
2024-08-25 21:35:59 +01:00
type: 'image/jpeg'
}
]
},
twitter: {
handle: '@classroomio',
site: '@classroomio',
cardType: 'summary_large_image' as const,
2024-10-07 01:36:07 +01:00
title: 'ClassroomIO | The Open Source Learning Management System for Companies',
2024-08-25 21:35:59 +01:00
description:
2024-10-07 01:36:07 +01:00
'A flexible, user-friendly platform for creating, managing, and delivering courses for companies and training organisations',
2024-09-05 15:51:05 +01:00
image: 'https://brand.cdn.clsrio.com/og/classroomio-og.png',
2024-08-25 21:35:59 +01:00
imageAlt: 'ClassroomIO OG Image'
}
}) satisfies MetaTagsProps;
return metatags;
}