From 5e8fb332ed905e8a7f1895ac6842f57ee2eb1b65 Mon Sep 17 00:00:00 2001 From: georg-stone Date: Thu, 17 Oct 2024 19:04:47 -0400 Subject: [PATCH] improve seo --- apps/web/src/app/layout.js | 11 +- apps/web/src/app/read/[articleUrl]/page.jsx | 155 ++++++++++---------- 2 files changed, 90 insertions(+), 76 deletions(-) diff --git a/apps/web/src/app/layout.js b/apps/web/src/app/layout.js index 5dcbc05..ce83155 100644 --- a/apps/web/src/app/layout.js +++ b/apps/web/src/app/layout.js @@ -1,6 +1,9 @@ +"use client"; + import localFont from "next/font/local"; import "./globals.css"; import { ThemeProvider } from "@/components/ui/theme-provider"; +import { usePathname } from "next/navigation"; const geistSans = localFont({ src: "./fonts/GeistVF.woff", @@ -14,10 +17,10 @@ const geistMono = localFont({ }); export default function RootLayout({ children }) { + const pathname = usePathname(); return ( - Feedbomb @@ -25,6 +28,12 @@ export default function RootLayout({ children }) { name="og:description" content="A minimalistic, fast RSS-reader." /> + {!pathname.startsWith("/read/") && ( + <> + + Feedbomb + + )} { isLoading = false; return ( -
+ {title} { + - -
- {isLoading ? ( -

- Loading... -

- ) : error ? ( - <> - We're sorry, but we couldn't process this article. -
-
-
+ +
+ {isLoading ? ( +

+ Loading... +

+ ) : error ? ( + <> + We're sorry, but we couldn't process this article. +
+
+ + + ) : ( + <> +

{title}

+ {!isYouTubeVideo && ( +

+ + By {typeof author === "string" ? author : author.name} + {" "} + | {new Date(datePublished).toLocaleString()} + {ttr > 60 ? ` | ${Math.floor(ttr / 60)} min read` : ""} +

+ )} - - - - + -
- - ) : ( - <> -

{title}

- {!isYouTubeVideo && ( -

- - By {typeof author === "string" ? author : author.name} - {" "} - | {new Date(datePublished).toLocaleString()} - {ttr > 60 ? ` | ${Math.floor(ttr / 60)} min read` : ""} -

- )} - - - -
-
- {isYouTubeVideo ? ( -
- -
- ) : ( -
- )} - - )} -
- -
+
+
+ {isYouTubeVideo ? ( +
+ +
+ ) : ( +
+ )} + + )} + + + + ); } catch (err) { return (