1000planets-site/app/layout.tsx

81 lines
2.7 KiB
TypeScript

import type { Metadata } from 'next'
import Script from 'next/script'
import { Dela_Gothic_One, JetBrains_Mono, Space_Grotesk } from 'next/font/google'
import './globals.css'
const spaceGrotesk = Space_Grotesk({ subsets: ['latin'], variable: '--font-body' })
const delaGothic = Dela_Gothic_One({ subsets: ['latin'], variable: '--font-heading' })
const jetbrains = JetBrains_Mono({ subsets: ['latin'], variable: '--font-data' })
const plausibleDomain = process.env.NEXT_PUBLIC_PLAUSIBLE_DOMAIN || '1000planets.cloud'
const gaMeasurementId = process.env.NEXT_PUBLIC_GA_MEASUREMENT_ID
const structuredData = {
'@context': 'https://schema.org',
'@type': 'Organization',
name: '1000 Planets',
url: 'https://1000planets.cloud',
logo: 'https://1000planets.cloud/logo.png',
sameAs: [
'https://www.linkedin.com/company/1000planets',
'https://www.twitter.com/1000planets',
],
description:
'1KP delivers AI-assisted marketing tools for small and micro businesses, keeping you in control of every customer touchpoint.',
}
export const metadata: Metadata = {
title: '1000 Planets · AI tools for small & micro businesses',
description:
'Post-marketing tools from 1KP that help small and micro teams capture leads, publish human-reviewed content, and launch five-page microsites fast.',
keywords: [
'small business marketing',
'lead capture',
'microsites',
'AI content tools',
'human-reviewed automation',
'small business growth',
],
}
export const viewport = { width: 'device-width', initialScale: 1 }
export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<body className={`${spaceGrotesk.variable} ${delaGothic.variable} ${jetbrains.variable}`}>
<Script
src="https://plausible.io/js/plausible.js"
data-domain={plausibleDomain}
strategy="afterInteractive"
/>
{gaMeasurementId && (
<>
<Script
src={`https://www.googletagmanager.com/gtag/js?id=${gaMeasurementId}`}
strategy="afterInteractive"
/>
<Script id="ga-init" strategy="afterInteractive">
{`
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '${gaMeasurementId}', {
page_path: window.location.pathname,
});
`}
</Script>
</>
)}
<Script id="structured-data" type="application/ld+json" strategy="afterInteractive">
{JSON.stringify(structuredData)}
</Script>
{children}
</body>
</html>
)
}