diff --git a/frontend/app/layout.tsx b/frontend/app/layout.tsx index 08f7a0b..d9ef4cc 100644 --- a/frontend/app/layout.tsx +++ b/frontend/app/layout.tsx @@ -1,10 +1,78 @@ -import type { Metadata } from "next"; +import type { Metadata, Viewport } from "next"; import "./globals.css"; export const metadata: Metadata = { - title: "hadiscover - Discover Home Assistant Automations", + title: "hadiscover - Discover Home Assistant Automations from the Community", description: - "Search and explore powerful Home Assistant automations from the community. Find triggers, actions, and blueprints shared on GitHub.", + "Search and explore powerful Home Assistant automations from the community. Find triggers, actions, and blueprints shared on GitHub. Discover real-world automation examples to enhance your smart home.", + keywords: [ + "Home Assistant", + "automations", + "smart home", + "YAML", + "GitHub", + "home automation", + "triggers", + "blueprints", + "IoT", + "search engine", + ], + authors: [{ name: "DevSecNinja" }], + creator: "DevSecNinja", + publisher: "hadiscover", + metadataBase: new URL("https://hadiscover.com"), + alternates: { + canonical: "https://hadiscover.com", + }, + openGraph: { + type: "website", + locale: "en_US", + url: "https://hadiscover.com", + title: "hadiscover - Discover Home Assistant Automations", + description: + "Search and explore powerful Home Assistant automations from the community. Find triggers, actions, and blueprints shared on GitHub.", + siteName: "hadiscover", + // Note: Add og-image.png to public directory for social media previews + // images: [ + // { + // url: "/og-image.png", + // width: 1200, + // height: 630, + // alt: "hadiscover - Home Assistant Automation Discovery", + // }, + // ], + }, + twitter: { + card: "summary_large_image", + title: "hadiscover - Discover Home Assistant Automations", + description: + "Search and explore powerful Home Assistant automations from the community. Find triggers, actions, and blueprints shared on GitHub.", + // Note: Add og-image.png to public directory for Twitter card images + // images: ["/og-image.png"], + creator: "@DevSecNinja", + }, + robots: { + index: true, + follow: true, + googleBot: { + index: true, + follow: true, + "max-video-preview": -1, + "max-image-preview": "large", + "max-snippet": -1, + }, + }, + manifest: "/site.webmanifest", +}; + +export const viewport: Viewport = { + width: "device-width", + initialScale: 1, + maximumScale: 5, + themeColor: [ + { media: "(prefers-color-scheme: light)", color: "#ffffff" }, + { media: "(prefers-color-scheme: dark)", color: "#0a0a0f" }, + ], }; export default function RootLayout({ diff --git a/frontend/app/page.tsx b/frontend/app/page.tsx index 0b2a913..5fb308f 100644 --- a/frontend/app/page.tsx +++ b/frontend/app/page.tsx @@ -259,14 +259,61 @@ export default function Home() { } }; + // JSON-LD structured data for SEO + const jsonLd = { + "@context": "https://schema.org", + "@type": "WebSite", + name: "hadiscover", + description: + "Search engine for discovering Home Assistant automations from the community", + url: "https://hadiscover.com", + potentialAction: { + "@type": "SearchAction", + target: { + "@type": "EntryPoint", + urlTemplate: "https://hadiscover.com/?q={search_term_string}", + }, + "query-input": "required name=search_term_string", + }, + provider: { + "@type": "Organization", + name: "DevSecNinja", + url: "https://github.com/DevSecNinja", + }, + }; + + const softwareApplicationJsonLd = { + "@context": "https://schema.org", + "@type": "SoftwareApplication", + name: "hadiscover", + applicationCategory: "SearchApplication", + operatingSystem: "Web", + offers: { + "@type": "Offer", + price: "0", + priceCurrency: "USD", + }, + description: + "Search and explore powerful Home Assistant automations from the community. Find triggers, actions, and blueprints shared on GitHub.", + url: "https://hadiscover.com", + author: { + "@type": "Person", + name: "DevSecNinja", + url: "https://github.com/DevSecNinja", + }, + }; + return ( -