mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-09 20:27:44 +00:00
feat: sitemap and favicons
This commit is contained in:
@@ -3,12 +3,10 @@ import type { Metadata } from "next";
|
|||||||
import {
|
import {
|
||||||
DocsPage,
|
DocsPage,
|
||||||
DocsBody,
|
DocsBody,
|
||||||
DocsDescription,
|
|
||||||
DocsTitle,
|
DocsTitle,
|
||||||
} from "fumadocs-ui/page";
|
} from "fumadocs-ui/page";
|
||||||
import { notFound } from "next/navigation";
|
import { notFound } from "next/navigation";
|
||||||
import { InlineTOC } from "fumadocs-ui/components/inline-toc";
|
|
||||||
import PromoCard from "@/components/promo-card";
|
|
||||||
|
|
||||||
export default async function Page({
|
export default async function Page({
|
||||||
params,
|
params,
|
||||||
|
|||||||
@@ -6,10 +6,49 @@ import type { ReactNode } from "react";
|
|||||||
import { NavbarProvider } from "@/components/nav-mobile";
|
import { NavbarProvider } from "@/components/nav-mobile";
|
||||||
import { GeistMono } from "geist/font/mono";
|
import { GeistMono } from "geist/font/mono";
|
||||||
import { GeistSans } from "geist/font/sans";
|
import { GeistSans } from "geist/font/sans";
|
||||||
|
import { ENV } from "@/lib/constants";
|
||||||
|
import { Metadata } from "next";
|
||||||
const inter = Inter({
|
const inter = Inter({
|
||||||
subsets: ["latin"],
|
subsets: ["latin"],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
export const metadata: Metadata = {
|
||||||
|
metadataBase: new URL(ENV.NEXT_PUBLIC_WEBSITE_URL),
|
||||||
|
title: {
|
||||||
|
default: "Better-Auth.",
|
||||||
|
template: "%s ~ Better Auth",
|
||||||
|
},
|
||||||
|
description: "Dev agnostic auth library solution",
|
||||||
|
openGraph: {
|
||||||
|
title: "Better-auth",
|
||||||
|
description: "Dev agnostic auth library solution",
|
||||||
|
url: ENV.NEXT_PUBLIC_WEBSITE_URL,
|
||||||
|
siteName: "Better-auth",
|
||||||
|
locale: "en_US",
|
||||||
|
type: "website",
|
||||||
|
},
|
||||||
|
robots: {
|
||||||
|
index: true,
|
||||||
|
follow: true,
|
||||||
|
googleBot: {
|
||||||
|
index: true,
|
||||||
|
follow: true,
|
||||||
|
"max-video-preview": -1,
|
||||||
|
"max-image-preview": "large",
|
||||||
|
"max-snippet": -1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
twitter: {
|
||||||
|
title: "Better-auth",
|
||||||
|
card: "summary_large_image",
|
||||||
|
},
|
||||||
|
verification: {
|
||||||
|
google: ENV.NEXT_PUBLIC_GOOGLE_SITE_VERIFICATION,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
export default function Layout({ children }: { children: ReactNode }) {
|
export default function Layout({ children }: { children: ReactNode }) {
|
||||||
return (
|
return (
|
||||||
<html lang="en" suppressHydrationWarning>
|
<html lang="en" suppressHydrationWarning>
|
||||||
|
|||||||
15
docs/app/sitemap.ts
Normal file
15
docs/app/sitemap.ts
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import type { MetadataRoute } from "next";
|
||||||
|
import { ENV } from "@/lib/constants";
|
||||||
|
import { getPages } from "./source";
|
||||||
|
|
||||||
|
export default function sitemap(): MetadataRoute.Sitemap {
|
||||||
|
const WEBSITE_URL = ENV.NEXT_PUBLIC_WEBSITE_URL;
|
||||||
|
const pages = getPages().map((page) => ({
|
||||||
|
slug: page.slugs,
|
||||||
|
}));
|
||||||
|
const docs = pages.map((plugin) => ({
|
||||||
|
url: `${WEBSITE_URL}/docs/${plugin.slug.join("/")}`,
|
||||||
|
lastModified: new Date().toISOString().split("T")[0],
|
||||||
|
}));
|
||||||
|
return [...docs];
|
||||||
|
}
|
||||||
6
docs/lib/constants.ts
Normal file
6
docs/lib/constants.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
export const ENV = {
|
||||||
|
NEXT_PUBLIC_WEBSITE_URL:
|
||||||
|
process.env.NEXT_PUBLIC_WEBSITE_URL || "http://localhost:3000",
|
||||||
|
NEXT_PUBLIC_GOOGLE_SITE_VERIFICATION: "",
|
||||||
|
NODE_ENV: process.env.NODE_ENV || "development",
|
||||||
|
};
|
||||||
BIN
docs/public/favicon/android-chrome-192x192.png
Normal file
BIN
docs/public/favicon/android-chrome-192x192.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.6 KiB |
BIN
docs/public/favicon/android-chrome-512x512.png
Normal file
BIN
docs/public/favicon/android-chrome-512x512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
BIN
docs/public/favicon/apple-touch-icon.png
Normal file
BIN
docs/public/favicon/apple-touch-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
BIN
docs/public/favicon/favicon-16x16.png
Normal file
BIN
docs/public/favicon/favicon-16x16.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 369 B |
BIN
docs/public/favicon/favicon-32x32.png
Normal file
BIN
docs/public/favicon/favicon-32x32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 664 B |
BIN
docs/public/favicon/favicon.ico
Normal file
BIN
docs/public/favicon/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
19
docs/public/favicon/site.webmanifest
Normal file
19
docs/public/favicon/site.webmanifest
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"short_name": "",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "/android-chrome-192x192.png",
|
||||||
|
"sizes": "192x192",
|
||||||
|
"type": "image/png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/android-chrome-512x512.png",
|
||||||
|
"sizes": "512x512",
|
||||||
|
"type": "image/png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"theme_color": "#ffffff",
|
||||||
|
"background_color": "#ffffff",
|
||||||
|
"display": "standalone"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user