mirror of
https://github.com/supabase/supabase.git
synced 2026-10-18 15:49:09 +03:00
## Problem - Favicon files and markup are duplicated across apps. ## Solution - Replace old files with one ICO, one Apple icon and two manifest icons per set. - Share icon markup and add generation notes and scripts. - Keep existing branding, including Learn's black and white icon. - Make the border radius match across all apps’ favicons. ## Review instructions - Check normal app icons and Studio staging in browser tabs. - Check icons load under `/docs` and `/kb`. - Run `node scripts/validate-favicons.mjs`. All 8 sets should pass.
70 lines
2.1 KiB
TypeScript
70 lines
2.1 KiB
TypeScript
import 'ui-patterns/ShimmeringLoader/index.css'
|
|
import '../styles/globals.css'
|
|
import '../styles/prism-okaidia.css'
|
|
|
|
import { GlobalProviders } from '~/features/app.providers'
|
|
import { DOCS_CONTENT_CONTAINER_ID } from '~/features/ui/helpers.constants'
|
|
import { TopNavSkeleton } from '~/layouts/MainSkeleton'
|
|
import { BASE_PATH, IS_PRODUCTION } from '~/lib/constants'
|
|
import { getCustomContent } from '~/lib/custom-content/getCustomContent'
|
|
import { TelemetryTagManager } from 'common'
|
|
import { genFaviconData } from 'common/MetaFavicons/app-router'
|
|
import type { Metadata, Viewport } from 'next'
|
|
import { SkipToContent } from 'ui-patterns/SkipToContent'
|
|
|
|
import { inter, manrope } from '@/fonts'
|
|
|
|
const { metadataApplicationName, metadataTitle } = getCustomContent([
|
|
'metadata:application_name',
|
|
'metadata:title',
|
|
])
|
|
|
|
const metadata: Metadata = {
|
|
applicationName: metadataApplicationName,
|
|
title: metadataTitle,
|
|
description:
|
|
'Supabase is the Postgres development platform providing all the backend features you need to build a product.',
|
|
metadataBase: new URL('https://supabase.com'),
|
|
icons: genFaviconData(BASE_PATH),
|
|
manifest: `${BASE_PATH}/favicon/manifest.json`,
|
|
robots: {
|
|
index: IS_PRODUCTION,
|
|
follow: IS_PRODUCTION,
|
|
},
|
|
openGraph: {
|
|
type: 'article',
|
|
authors: 'Supabase',
|
|
url: `${BASE_PATH}`,
|
|
images: `${BASE_PATH}/img/supabase-og-image.png`,
|
|
publishedTime: new Date().toISOString(),
|
|
modifiedTime: new Date().toISOString(),
|
|
},
|
|
twitter: {
|
|
card: 'summary_large_image',
|
|
site: '@supabase',
|
|
creator: '@supabase',
|
|
images: `${BASE_PATH}/img/supabase-og-image.png`,
|
|
},
|
|
}
|
|
|
|
const viewport: Viewport = {
|
|
themeColor: '#1E1E1E',
|
|
}
|
|
|
|
const RootLayout = ({ children }: { children: React.ReactNode }) => {
|
|
return (
|
|
<html lang="en" className={`${manrope.variable} ${inter.variable}`} suppressHydrationWarning>
|
|
<body>
|
|
<SkipToContent href={`#${DOCS_CONTENT_CONTAINER_ID}`} />
|
|
<TelemetryTagManager />
|
|
<GlobalProviders>
|
|
<TopNavSkeleton>{children}</TopNavSkeleton>
|
|
</GlobalProviders>
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|
|
|
|
export { metadata, viewport }
|
|
export default RootLayout
|