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 ( -
- {/* Theme Toggle Button */} + <> + {/* JSON-LD structured data is now intended to be rendered from a server component + (e.g., layout.tsx) to ensure it is included in the initial HTML response. */} +
+ {/* Theme Toggle Button */}
-
+ + ); } diff --git a/frontend/public/robots.txt b/frontend/public/robots.txt new file mode 100644 index 0000000..e98b7b5 --- /dev/null +++ b/frontend/public/robots.txt @@ -0,0 +1,6 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Allow: / + +# Sitemap +Sitemap: https://hadiscover.com/sitemap.xml diff --git a/frontend/public/site.webmanifest b/frontend/public/site.webmanifest new file mode 100644 index 0000000..1392a3a --- /dev/null +++ b/frontend/public/site.webmanifest @@ -0,0 +1,17 @@ +{ + "name": "hadiscover - Home Assistant Automation Discovery", + "short_name": "hadiscover", + "description": "Search and discover Home Assistant automations from the community", + "start_url": "/", + "display": "standalone", + "background_color": "#0a0a0f", + "theme_color": "#0a0a0f", + "orientation": "portrait-primary", + "icons": [ + { + "src": "/favicon.ico", + "sizes": "any", + "type": "image/x-icon" + } + ] +} diff --git a/frontend/public/sitemap.xml b/frontend/public/sitemap.xml new file mode 100644 index 0000000..e6320e5 --- /dev/null +++ b/frontend/public/sitemap.xml @@ -0,0 +1,13 @@ + + + + + https://hadiscover.com/ + 2024-12-01 + daily + 1.0 + +