fix: browser tab title should always just say "Epicure"
Root layout used title.template ("%s | Epicure") and 38 pages set
their own title, producing "Recipes | Epicure", "Messages — Epicure",
etc. Drop the template, set a flat "Epicure" default, and clear every
page's title override so they all inherit it.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,7 @@ import { getMessages } from "@/lib/i18n/server";
|
||||
|
||||
type Params = { params: Promise<{ id: string }> };
|
||||
|
||||
export const metadata: Metadata = { title: "Collection" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export default async function CollectionPage({ params }: Params) {
|
||||
const { id } = await params;
|
||||
|
||||
@@ -4,7 +4,7 @@ import { auth } from "@/lib/auth/server";
|
||||
import { db, collections, eq, desc } from "@epicure/db";
|
||||
import { CollectionsPageContent } from "@/components/collections/collections-page-content";
|
||||
|
||||
export const metadata: Metadata = { title: "Collections" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export default async function CollectionsPage() {
|
||||
const session = await auth.api.getSession({ headers: await headers() });
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
} from "@epicure/db";
|
||||
import { ExplorePageContent } from "@/components/search/explore-page-content";
|
||||
|
||||
export const metadata: Metadata = { title: "Explore — Epicure" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export type RecipeResult = {
|
||||
id: string;
|
||||
|
||||
@@ -5,7 +5,7 @@ import { db, recipes, users, userFollows, eq, desc, inArray } from "@epicure/db"
|
||||
import { getPublicUrl } from "@/lib/storage";
|
||||
import { FeedPageContent } from "@/components/feed/feed-page-content";
|
||||
|
||||
export const metadata: Metadata = { title: "Feed" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export default async function FeedPage() {
|
||||
const session = await auth.api.getSession({ headers: await headers() });
|
||||
|
||||
@@ -13,7 +13,7 @@ import { ExportMarkdownButton } from "@/components/shared/export-markdown-button
|
||||
import { mealPlanToMarkdown } from "@/lib/markdown/meal-plan";
|
||||
import { getMessages, formatMessage } from "@/lib/i18n/server";
|
||||
|
||||
export const metadata: Metadata = { title: "Meal Plan" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
function getMonday(dateStr?: string): Date {
|
||||
const d = dateStr ? new Date(dateStr) : new Date();
|
||||
|
||||
@@ -9,7 +9,7 @@ import { getMessages, formatMessage } from "@/lib/i18n/server";
|
||||
|
||||
type Params = { params: Promise<{ mealPlanId: string }> };
|
||||
|
||||
export const metadata: Metadata = { title: "Shared Meal Plan" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export default async function SharedMealPlanPage({ params }: Params) {
|
||||
const { mealPlanId } = await params;
|
||||
|
||||
@@ -5,7 +5,7 @@ import { auth } from "@/lib/auth/server";
|
||||
import { ConversationsList } from "@/components/social/conversations-list";
|
||||
import { getMessages } from "@/lib/i18n/server";
|
||||
|
||||
export const metadata: Metadata = { title: "Messages — Epicure" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export default async function MessagesPage() {
|
||||
const session = await auth.api.getSession({ headers: await headers() });
|
||||
|
||||
@@ -5,7 +5,7 @@ import { db, pantryItems, eq, asc } from "@epicure/db";
|
||||
import { PantryManager } from "@/components/meal-plan/pantry-manager";
|
||||
import { PantryPageHeader } from "@/components/pantry/pantry-page-header";
|
||||
|
||||
export const metadata: Metadata = { title: "Pantry" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export default async function PantryPage() {
|
||||
const session = await auth.api.getSession({ headers: await headers() });
|
||||
|
||||
@@ -4,7 +4,7 @@ import { auth } from "@/lib/auth/server";
|
||||
import { PeopleSearch } from "@/components/social/people-search";
|
||||
import { getMessages } from "@/lib/i18n/server";
|
||||
|
||||
export const metadata: Metadata = { title: "Find People — Epicure" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export default async function PeoplePage() {
|
||||
const session = await auth.api.getSession({ headers: await headers() });
|
||||
|
||||
@@ -9,7 +9,7 @@ import { getPublicUrl } from "@/lib/storage";
|
||||
|
||||
type Params = { params: Promise<{ id: string }> };
|
||||
|
||||
export const metadata: Metadata = { title: "Edit Recipe" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export default async function EditRecipePage({ params }: Params) {
|
||||
const { id } = await params;
|
||||
|
||||
@@ -6,7 +6,7 @@ import { eq } from "@epicure/db";
|
||||
import { getPublicUrl } from "@/lib/storage";
|
||||
import { CanCookContent } from "@/components/recipe/can-cook-content";
|
||||
|
||||
export const metadata: Metadata = { title: "What can I cook?" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
const EXPIRING_WITHIN_DAYS = 3;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { RecipeForm } from "@/components/recipe/recipe-form";
|
||||
import { NewRecipeHeader } from "@/components/recipe/new-recipe-header";
|
||||
import { PhotoImportButton } from "@/components/recipe/photo-import-button";
|
||||
|
||||
export const metadata: Metadata = { title: "New Recipe" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export default function NewRecipePage() {
|
||||
return (
|
||||
|
||||
@@ -7,7 +7,7 @@ import { RecipesHeader } from "@/components/recipe/recipes-header";
|
||||
import { RecipesEmptyState } from "@/components/recipe/recipes-empty-state";
|
||||
import { RecipesGrid } from "@/components/recipe/recipes-grid";
|
||||
|
||||
export const metadata: Metadata = { title: "Recipes" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
type SearchParams = Promise<{
|
||||
q?: string;
|
||||
|
||||
@@ -6,7 +6,7 @@ import { ByokManager } from "@/components/settings/byok-manager";
|
||||
import { ModelPrefsForm } from "@/components/settings/model-prefs-form";
|
||||
import { getMessages } from "@/lib/i18n/server";
|
||||
|
||||
export const metadata: Metadata = { title: "AI & Models – Settings" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export default async function AiSettingsPage() {
|
||||
const session = await auth.api.getSession({ headers: await headers() });
|
||||
|
||||
@@ -7,7 +7,7 @@ import { db, apiKeys, eq } from "@epicure/db";
|
||||
import { ApiKeysManager } from "@/components/settings/api-keys-manager";
|
||||
import { getMessages } from "@/lib/i18n/server";
|
||||
|
||||
export const metadata: Metadata = { title: "API Keys" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export default async function ApiKeysPage() {
|
||||
const session = await auth.api.getSession({ headers: await headers() });
|
||||
|
||||
@@ -4,7 +4,7 @@ import { auth } from "@/lib/auth/server";
|
||||
import { PushSubscribeButton } from "@/components/pwa/push-subscribe-button";
|
||||
import { getMessages } from "@/lib/i18n/server";
|
||||
|
||||
export const metadata: Metadata = { title: "Notifications – Settings" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export default async function NotificationsPage() {
|
||||
const session = await auth.api.getSession({ headers: await headers() });
|
||||
|
||||
@@ -5,7 +5,7 @@ import { db, userNutritionGoals, eq } from "@epicure/db";
|
||||
import { NutritionGoalsForm } from "@/components/nutrition/nutrition-goals-form";
|
||||
import { getMessages } from "@/lib/i18n/server";
|
||||
|
||||
export const metadata: Metadata = { title: "Nutrition – Settings" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export default async function NutritionPage() {
|
||||
const session = await auth.api.getSession({ headers: await headers() });
|
||||
|
||||
@@ -4,7 +4,7 @@ import { auth } from "@/lib/auth/server";
|
||||
import { db, users, eq } from "@epicure/db";
|
||||
import { SettingsForm } from "@/components/settings/settings-form";
|
||||
|
||||
export const metadata: Metadata = { title: "Profile – Settings" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export default async function SettingsPage() {
|
||||
const session = await auth.api.getSession({ headers: await headers() });
|
||||
|
||||
@@ -3,7 +3,7 @@ import { headers } from "next/headers";
|
||||
import { auth } from "@/lib/auth/server";
|
||||
import { SecurityForm } from "@/components/settings/security-form";
|
||||
|
||||
export const metadata: Metadata = { title: "Security – Settings" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export default async function SecurityPage() {
|
||||
const session = await auth.api.getSession({ headers: await headers() });
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import type { Metadata } from "next";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Webhook Docs — Epicure",
|
||||
};
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export default function WebhookDocsPage() {
|
||||
return (
|
||||
|
||||
@@ -5,7 +5,7 @@ import { db, webhooks, eq } from "@epicure/db";
|
||||
import { WebhooksManager } from "@/components/settings/webhooks-manager";
|
||||
import { getMessages } from "@/lib/i18n/server";
|
||||
|
||||
export const metadata: Metadata = { title: "Webhooks" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export default async function WebhooksPage() {
|
||||
const session = await auth.api.getSession({ headers: await headers() });
|
||||
|
||||
@@ -17,7 +17,7 @@ import { getMessages, formatMessage } from "@/lib/i18n/server";
|
||||
|
||||
type Params = { params: Promise<{ id: string }> };
|
||||
|
||||
export const metadata: Metadata = { title: "Shopping List" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export default async function ShoppingListPage({ params }: Params) {
|
||||
const { id } = await params;
|
||||
|
||||
@@ -4,7 +4,7 @@ import { auth } from "@/lib/auth/server";
|
||||
import { db, shoppingLists, shoppingListMembers, eq, desc } from "@epicure/db";
|
||||
import { ShoppingListsPageContent } from "@/components/shopping-lists/shopping-lists-page-content";
|
||||
|
||||
export const metadata: Metadata = { title: "Shopping Lists" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export default async function ShoppingListsPage() {
|
||||
const session = await auth.api.getSession({ headers: await headers() });
|
||||
|
||||
@@ -5,7 +5,7 @@ import { CheckCircle, XCircle, Database, Cpu } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { getAllSiteSettings } from "@/lib/site-settings";
|
||||
|
||||
export const metadata: Metadata = { title: "AI Config" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
function resolveProvider(settings: Record<string, { value: string | null }>) {
|
||||
if (settings["OPENROUTER_API_KEY"]?.value) return { provider: "OpenRouter", description: "Routes to many models via openrouter.ai" };
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Metadata } from "next";
|
||||
import { db, auditLogs, users, eq, desc } from "@epicure/db";
|
||||
|
||||
export const metadata: Metadata = { title: "Audit Logs" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
const PAGE_SIZE = 50;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { Metadata } from "next";
|
||||
import { listInvites } from "@/lib/invites";
|
||||
import { InvitesManager } from "@/components/admin/invites-manager";
|
||||
|
||||
export const metadata: Metadata = { title: "Invites – Admin" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export default async function AdminInvitesPage() {
|
||||
const invites = await listInvites();
|
||||
|
||||
@@ -5,7 +5,7 @@ import { count, eq, sql } from "@epicure/db";
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import { Users, BookOpen, Sparkles, Image } from "lucide-react";
|
||||
|
||||
export const metadata: Metadata = { title: "Admin Overview" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export default async function AdminPage() {
|
||||
const currentMonth = new Date().toISOString().slice(0, 7);
|
||||
|
||||
@@ -3,7 +3,7 @@ import { db, recipes, users, eq, desc } from "@epicure/db";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import Link from "next/link";
|
||||
|
||||
export const metadata: Metadata = { title: "Recipe Moderation" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
const VISIBILITY_COLORS = {
|
||||
public: "default",
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { Metadata } from "next";
|
||||
import { db, reports, users, eq, desc } from "@epicure/db";
|
||||
import { ReportsQueue } from "@/components/admin/reports-queue";
|
||||
|
||||
export const metadata: Metadata = { title: "Reports – Admin" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export default async function AdminReportsPage() {
|
||||
const rows = await db
|
||||
|
||||
@@ -3,7 +3,7 @@ import { getAllSiteSettings, isSignupsDisabled } from "@/lib/site-settings";
|
||||
import { AdminSettingsForm } from "@/components/admin/admin-settings-form";
|
||||
import { SignupsToggle } from "@/components/admin/signups-toggle";
|
||||
|
||||
export const metadata: Metadata = { title: "Site Settings – Admin" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
const SETTING_GROUPS = [
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { HardDrive } from "lucide-react";
|
||||
|
||||
export const metadata: Metadata = { title: "Storage Usage" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export default async function AdminStoragePage() {
|
||||
const [totalPhotos, recipesWithPhotos, photosByTier, topUsers] = await Promise.all([
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { Metadata } from "next";
|
||||
import { db, tierDefinitions } from "@epicure/db";
|
||||
import { TierLimitsForm } from "@/components/admin/tier-limits-form";
|
||||
|
||||
export const metadata: Metadata = { title: "Tier Limits – Admin" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export default async function AdminTiersPage() {
|
||||
const tiers = await db.select().from(tierDefinitions);
|
||||
|
||||
@@ -10,7 +10,7 @@ import { ResetUsageButton } from "@/components/admin/reset-usage-button";
|
||||
import Link from "next/link";
|
||||
import { ArrowLeft } from "lucide-react";
|
||||
|
||||
export const metadata: Metadata = { title: "User Detail" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
interface PageProps {
|
||||
params: Promise<{ id: string }>;
|
||||
|
||||
@@ -7,7 +7,7 @@ import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
||||
import { CreateUserDialog } from "@/components/admin/create-user-dialog";
|
||||
import Link from "next/link";
|
||||
|
||||
export const metadata: Metadata = { title: "User Management" };
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
const ROLE_COLORS = {
|
||||
user: "secondary",
|
||||
|
||||
@@ -19,7 +19,7 @@ const geistMono = Geist_Mono({
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: { default: "Epicure", template: "%s | Epicure" },
|
||||
title: "Epicure",
|
||||
description: "Your personal AI-powered recipe book.",
|
||||
manifest: "/manifest.json",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user