Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 14 additions & 18 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ import { StoreProvider } from '@/providers/store-provider';

const openSans = Open_Sans({ subsets: ['latin'] });

// ibl.ai default icon set, served when no tenant-specific favicon override is set.
const DEFAULT_ICONS: Metadata['icons'] = [
{ rel: 'icon', url: '/favicon.ico', sizes: 'any', type: 'image/x-icon' },
{ rel: 'icon', url: '/icon.svg', type: 'image/svg+xml' },
{ rel: 'icon', url: '/favicon-32x32.png', sizes: '32x32', type: 'image/png' },
{ rel: 'icon', url: '/favicon-16x16.png', sizes: '16x16', type: 'image/png' },
{ rel: 'apple-touch-icon', url: '/apple-touch-icon.png' },
];

// Force all pages to be dynamically rendered on the client
// This prevents the "window is not defined" error during build
export const dynamic = 'force-dynamic';
Expand Down Expand Up @@ -69,12 +78,9 @@ export async function generateMetadata(): Promise<Metadata> {
title: metadata.title,
description: metadata.description,
generator: 'ibl.ai',
icons: [
{
rel: 'icon',
url: faviconPath,
},
],
// Use the full ibl.ai icon set for the default favicon; fall back to a
// single icon when a tenant provides a custom favicon override.
icons: faviconPath === '/favicon.ico' ? DEFAULT_ICONS : [{ rel: 'icon', url: faviconPath }],
...(baseUrl && { metadataBase: new URL(baseUrl) }),
openGraph: {
title: metadata.title,
Expand Down Expand Up @@ -115,25 +121,15 @@ export async function generateMetadata(): Promise<Metadata> {
title: 'skillsAI',
description: 'Build Your Skills with AI',
generator: 'ibl.ai',
icons: [
{
rel: 'icon',
url: '/favicon.ico',
},
],
icons: DEFAULT_ICONS,
...(baseUrl && { metadataBase: new URL(baseUrl) }),
};
} catch {
return {
title: 'skillsAI',
description: 'Build Your Skills with AI',
generator: 'ibl.ai',
icons: [
{
rel: 'icon',
url: '/favicon.ico',
},
],
icons: DEFAULT_ICONS,
};
}
}
Expand Down
Binary file added public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/favicon.ico
Binary file not shown.
Binary file modified public/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading