diff --git a/apps/readest-app/src/app/layout.tsx b/apps/readest-app/src/app/layout.tsx index bf450dec..f14ccf6d 100644 --- a/apps/readest-app/src/app/layout.tsx +++ b/apps/readest-app/src/app/layout.tsx @@ -1,4 +1,5 @@ import * as React from 'react'; +import type { Metadata, Viewport } from 'next'; import { ViewTransitions } from 'next-view-transitions'; import { EnvProvider } from '@/context/EnvContext'; import Providers from '@/components/Providers'; @@ -14,8 +15,12 @@ const description = 'Perfect for deep reading, analysis, and understanding. Explore now!'; const previewImage = 'https://cdn.readest.com/images/open_graph_preview_read_now.png'; -export const metadata = { - title, +export const metadata: Metadata = { + metadataBase: new URL(url), + title: { + default: title, + template: '%s | Readest', + }, description, generator: 'Next.js', manifest: '/manifest.json', @@ -26,15 +31,39 @@ export const metadata = { url: 'https://github.com/readest/readest', }, ], - icons: [ - { rel: 'apple-touch-icon', url: '/apple-touch-icon.png' }, - { rel: 'icon', url: '/icon.png' }, - ], + icons: { + icon: [{ url: '/icon.png' }, { url: '/favicon.ico' }], + apple: [{ url: '/apple-touch-icon.png', sizes: '180x180' }], + }, + appleWebApp: { + capable: true, + title: 'Readest', + statusBarStyle: 'default', + }, + openGraph: { + type: 'website', + url, + title, + description, + images: [previewImage], + }, + twitter: { + card: 'summary_large_image', + title, + description, + images: [previewImage], + }, + other: { + 'apple-mobile-web-app-capable': 'yes', + 'twitter:domain': 'web.readest.com', + 'twitter:url': url, + }, }; -export const viewport = { +export const viewport: Viewport = { width: 'device-width', initialScale: 1, + minimumScale: 1, maximumScale: 1, userScalable: false, viewportFit: 'cover', @@ -46,32 +75,6 @@ export default function RootLayout({ children }: { children: React.ReactNode }) lang='en' className={process.env['NEXT_PUBLIC_APP_PLATFORM'] === 'tauri' ? 'edge-to-edge' : ''} > - - {title} - - - - - - - - - - - - - - - - - - - - - diff --git a/apps/readest-app/src/app/user/layout.tsx b/apps/readest-app/src/app/user/layout.tsx index 472c4cd1..57d04ffd 100644 --- a/apps/readest-app/src/app/user/layout.tsx +++ b/apps/readest-app/src/app/user/layout.tsx @@ -1,8 +1,9 @@ import { Metadata } from 'next'; export const metadata: Metadata = { - title: 'User Account', - description: 'Manage your account settings and subscription', + title: 'Account & Sign In', + description: + 'Sign in to your Readest account or manage your subscription, cloud library storage, and account settings.', }; export default function ProfileLayout({ children }: { children: React.ReactNode }) {