From 3083be0c9dc9ec0ded58eda937b83fbdf511f386 Mon Sep 17 00:00:00 2001
From: Mohamed Bassem <me@mbassem.com>
Date: Sun, 9 Nov 2025 11:50:58 +0000
Subject: feat: Add page titles (#2109)

* feat: add Next.js metadata titles to dynamic and settings pages

Add page titles using Next.js metadata API for better SEO and user experience:
- List pages: Show list name in format "<name> | Karakeep"
- Tag pages: Show tag name in format "<name> | Karakeep"
- Admin pages: Add titles for overview, users, and background jobs pages
- Settings pages: Add titles for all settings pages (API keys, AI, feeds, import, info, webhooks, subscription, rules, stats, assets, broken links)

For client components (rules, stats, assets, broken-links), created layout.tsx files to export metadata since metadata can only be exported from server components.

* feat: add Next.js metadata titles to dashboard pages

Add page titles using Next.js metadata API to archive, favourites, highlights, and all tags pages:
- Archive page: Show "Archive | Karakeep"
- Favourites page: Show "Favourites | Karakeep"
- Highlights page: Show "Highlights | Karakeep"
- All Tags page: Show "All Tags | Karakeep"

Improves SEO and user experience across all dashboard browsing pages.

* refactor: use i18n translations for dashboard page titles

Convert hardcoded page titles to use translations via generateMetadata:
- Archive page: Uses common.archive translation
- Favourites page: Uses lists.favourites translation
- Highlights page: Uses common.highlights translation
- All Tags page: Uses tags.all_tags translation

Improves localization support across dashboard pages.

* feat: add i18n translations to admin and settings page titles

Convert hardcoded page titles to use translations via generateMetadata:
- Admin Overview: Uses admin.admin_settings translation
- AI Settings: Uses settings.ai.ai_settings translation
- API Keys: Uses settings.api_keys.api_keys translation
- Feed Settings: Uses settings.feeds.rss_subscriptions translation
- Import/Export: Uses settings.import.import_export translation
- Account Info: Uses settings.info.user_info translation
- Subscription: Uses settings.subscription.subscription translation
- Webhooks: Uses settings.webhooks.webhooks translation

Improves localization support across admin and settings pages.

* revert accidental commit

* more translations

* more fixes

---------

Co-authored-by: Claude <noreply@anthropic.com>
---
 apps/web/app/settings/broken-links/layout.tsx | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 apps/web/app/settings/broken-links/layout.tsx

(limited to 'apps/web/app/settings/broken-links/layout.tsx')

diff --git a/apps/web/app/settings/broken-links/layout.tsx b/apps/web/app/settings/broken-links/layout.tsx
new file mode 100644
index 00000000..45f3dadf
--- /dev/null
+++ b/apps/web/app/settings/broken-links/layout.tsx
@@ -0,0 +1,18 @@
+import type { Metadata } from "next";
+import { useTranslation } from "@/lib/i18n/server";
+
+export async function generateMetadata(): Promise<Metadata> {
+  // oxlint-disable-next-line rules-of-hooks
+  const { t } = await useTranslation();
+  return {
+    title: `${t("settings.broken_links.broken_links")} | Karakeep`,
+  };
+}
+
+export default function BrokenLinksLayout({
+  children,
+}: {
+  children: React.ReactNode;
+}) {
+  return <>{children}</>;
+}
-- 
cgit v1.2.3-70-g09d2

