Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

4.4 KB
Raw Blame
import type { Metadata, Viewport } from "next";
import Script from "next/script";
import { ThemeSync } from "@/components/landing/theme-sync";
import { landing } from "@/lib/landing";
import "./globals.css";

const siteTitle = landing.seo.title;
const siteDescription = landing.seo.description;

export const viewport: Viewport = {
  themeColor: [
    { media: "(prefers-color-scheme: light)", color: "#ffffff" },
    { media: "(prefers-color-scheme: dark)", color: "#141414" },
  ],
};

export const metadata: Metadata = {
  metadataBase: new URL("https://kaneo.app"),
  title: {
    default: siteTitle,
    template: "%s | Kaneo",
  },
  description: siteDescription,
  keywords: [
    "kaneo",
    "project management",
    "project management software",
    "kanban",
    "task management",
    "issue tracking",
    "team collaboration",
  ],
  applicationName: "Kaneo",
  alternates: {
    canonical: "/",
  },
  openGraph: {
    type: "website",
    url: "https://kaneo.app",
    siteName: "Kaneo",
    title: siteTitle,
    description: siteDescription,
    images: [
      {
        url: "/images/hero.png",
        width: 1200,
        height: 630,
        alt: "Kaneo",
      },
    ],
  },
  twitter: {
    card: "summary_large_image",
    title: siteTitle,
    description: siteDescription,
    images: ["/images/hero.png"],
  },
  robots: {
    index: true,
    follow: true,
  },
  icons: {
    icon: "/favicon.svg",
    shortcut: "/favicon.svg",
    apple: "/apple-touch-icon.png",
  },
  category: "productivity",
  creator: "Kaneo",
  publisher: "Kaneo",
};

const jsonLd = [
  {
    "@context": "https://schema.org",
    "@type": "Organization",
    name: "Kaneo",
    url: "https://kaneo.app",
    logo: "https://kaneo.app/logo-512.png",
    sameAs: ["https://github.com/usekaneo/kaneo"],
  },
  {
    "@context": "https://schema.org",
    "@type": "WebSite",
    name: "Kaneo",
    url: "https://kaneo.app",
    inLanguage: "en",
  },
  {
    "@context": "https://schema.org",
    "@type": "SoftwareApplication",
    name: "Kaneo",
    applicationCategory: "BusinessApplication",
    operatingSystem: "Web, Linux, macOS, Windows",
    description: siteDescription,
    url: "https://kaneo.app",
    image: "https://kaneo.app/images/hero.png",
    license: "https://github.com/usekaneo/kaneo/blob/main/LICENSE",
    offers: [
      {
        "@type": "Offer",
        name: "Kaneo Cloud Personal",
        price: "4",
        priceCurrency: "USD",
        url: "https://kaneo.app/pricing",
      },
      {
        "@type": "Offer",
        name: "Kaneo Cloud Team",
        price: "5",
        priceCurrency: "USD",
        url: "https://kaneo.app/pricing",
      },
    ],
  },
];

export default function RootLayout({
  children,
}: Readonly<{ children: React.ReactNode }>) {
  return (
    <html lang="en" suppressHydrationWarning>
      <head>
        <script
          // eslint-disable-next-line react/no-danger -- Apply the theme before the page paints, including when JavaScript bundles load slowly.
          dangerouslySetInnerHTML={{
            __html: `
              (function() {
                var stored = null;
                try {
                  stored = localStorage.getItem('kaneo-site-theme');
                } catch (e) {}
                var isDark = stored === 'dark' || (stored !== 'light' && window.matchMedia('(prefers-color-scheme: dark)').matches);
                document.documentElement.classList.toggle('dark', isDark);
                document.documentElement.style.colorScheme = isDark ? 'dark' : 'light';
              })();
            `,
          }}
        />
      </head>
      <body>
        <ThemeSync />
        {children}
        <script
          type="application/ld+json"
          // eslint-disable-next-line react/no-danger -- JSON-LD structured data must be inlined as a script tag for search engines to parse.
          dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
        />
        <Script
          defer
          data-domain="kaneo.app"
          src="https://plausible.kaneo.app/js/script.file-downloads.hash.outbound-links.pageview-props.revenue.tagged-events.js"
          strategy="afterInteractive"
        />
        <Script id="plausible-init" strategy="afterInteractive">
          {
            "window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }"
          }
        </Script>
      </body>
    </html>
  );
}