caelum0x 17712c12b7 fix(rithub,ritgram): clean mobile footer + wire real Ritgram OG card
- Rithub: desktop keeps the 12-link SEO footer unchanged; <=640px now
  shows a short 5-link footer (Explore, Sign up, Move from GitHub,
  Rithub vs GitHub, Is GitHub down?) instead of the full keyword list,
  which read as spam stacked above the mobile tab bar. All 5 links
  verified 200. SEO guides stay crawlable via sitemap-seo.xml.
- Mobile bottom tab bar was already fixed-position with safe-area
  padding and body bottom-padding (shipped in a0b4c089) -- verified
  still correct live at 390px, nothing to change there.
- Ritgram: wired the real uploaded OG card
  (https://assets.scribase.com/cards/ritgram-og-1200x630-1117b.png,
  verified 200 image/png 1200x630) into root layout.tsx's openGraph +
  twitter metadata, replacing the placeholder blue-"R" dynamic
  app/opengraph-image.tsx route (deleted) and the dead /og-image.png
  reference.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-11-17 21:40:49 +03:00

100 lines
4.0 KiB
TypeScript

import type { Metadata, Viewport } from 'next'
import './globals.css'
import { Providers } from './providers'
import ConditionalLayout from './ConditionalLayout'
import { RegisterSW } from './register-sw'
import { AppShortcutsProvider } from '@/components/AppShortcutsProvider'
import { RealtimeToast } from '@/components/RealtimeToast'
// `next/font/google` (Space_Grotesk) fetches the font over the network at
// *build* time; on a CPU-constrained box (railyard-box: 2 vCPU, shared with
// every other Railyard service) that fetch consistently timed out
// ("Failed to fetch `Space Grotesk` from Google Fonts") even though a plain
// `curl` to the same URL from the same host succeeded instantly — repro'd
// 4/4 times, including with `docker build --network=host`, blocking every
// production build. Dropped the network dependency: `globals.css` and
// `tailwind.config.js` already list 'Space Grotesk' first in a real CSS
// font-family stack (not the Next-generated CSS variable), so simply not
// injecting the Next font class falls straight through to the next listed
// system font (-apple-system/Segoe UI/sans-serif) with no further change.
export const viewport: Viewport = {
themeColor: '#0071E3',
}
export const metadata: Metadata = {
metadataBase: new URL(process.env.NEXT_PUBLIC_SITE_URL || 'https://ritgram.rithub.dev'),
title: {
default: 'Ritgram - Where Code Becomes Community',
template: '%s | Ritgram',
},
description: 'The social platform for developers. Share GitHub projects, discover trending repositories, connect with developers worldwide, and build your coding portfolio.',
keywords: ['developer social network', 'GitHub', 'code sharing', 'developer community', 'open source', 'coding portfolio'],
authors: [{ name: 'Ritgram' }],
manifest: '/manifest.json',
appleWebApp: {
capable: true,
statusBarStyle: 'black-translucent',
title: 'Ritgram',
},
openGraph: {
type: 'website',
locale: 'en_US',
url: 'https://ritgram.rithub.dev',
siteName: 'Ritgram',
title: 'Ritgram - Where Code Becomes Community',
description: 'The social platform for developers. Share GitHub projects, discover trending repositories, and connect with developers worldwide.',
// Real designed OG card (2026-11-17, wave5/8c), uploaded to Cloudflare
// R2 (bucket social-assets, key cards/ritgram-og-1200x630-1117b.png)
// and served from the same assets.scribase.com CDN domain the sibling
// Rithub/Gitea card already uses -- verified 200 image/png 1200x630,
// 34680 bytes. Replaces the earlier `/og-image.png` reference (never a
// real file) and the dynamic app/opengraph-image.tsx placeholder route
// (deleted alongside this change) that rendered a plain blue "R" mark.
images: [
{
url: 'https://assets.scribase.com/cards/ritgram-og-1200x630-1117b.png',
width: 1200,
height: 630,
alt: 'Ritgram - Where Code Becomes Community',
},
],
},
twitter: {
card: 'summary_large_image',
title: 'Ritgram - Where Code Becomes Community',
description: 'The social platform for developers. Share GitHub projects, discover trending repositories, and connect with developers worldwide.',
// Explicit images array now that the URL is a real, permanent CDN
// asset (no more file-convention opengraph-image route to fall back
// to, since that route was deleted) -- same card as og:image above.
images: ['https://assets.scribase.com/cards/ritgram-og-1200x630-1117b.png'],
},
robots: {
index: true,
follow: true,
},
}
export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<body>
<Providers>
<AppShortcutsProvider>
<ConditionalLayout>
{children}
</ConditionalLayout>
{/* Global SSE-driven toast stack — renders only when authenticated. */}
<RealtimeToast />
</AppShortcutsProvider>
</Providers>
<RegisterSW />
</body>
</html>
)
}