Files
supabase/apps/docs/app/layout.tsx
T
Danny White 7b48b298ee feat(apps): distinguish local development with blue blueprint favicons (#51420)
## Problem

- Local apps are hard to distinguish from hosted apps in browser tabs.

## Solution

- Add blue blueprint icons to local development in all 8 apps and Studio
CLI.
- Keep normal branding for production, hosted staging and self-hosted
Studio.
- Builds on #51419.


| Before | After |
| --- | --- |
| <img width="1290" height="76" alt="CleanShot 2026-10-08 at 13 29
14@2x"
src="https://github.com/user-attachments/assets/72bc50d7-37e0-47d0-8dfd-50e233a443bd"
/> | <img width="1282" height="72" alt="CleanShot 2026-10-08 at 13 30
03@2x"
src="https://github.com/user-attachments/assets/afb15a70-3938-4cff-9b41-dc6c25460b7c"
/> |

## Review instructions

- Start an app locally. Its browser tab should show the blue icon.
- Check Studio CLI uses blue and hosted staging uses white.
- Check production icons are unchanged, including Learn's black and
white icon.
- Run `node scripts/validate-favicons.mjs`. All 16 sets should pass.

Asset and routing checks, formatting and Common/Studio type checks
passed. Full builds have not been run.

## Checklist

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
2026-10-12 10:26:51 +11:00

72 lines
2.3 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 FAVICON_ROUTE = process.env.NODE_ENV === 'development' ? '/favicon/local' : '/favicon'
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, FAVICON_ROUTE),
manifest: `${BASE_PATH}${FAVICON_ROUTE}/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