Skip to content

Commit

Permalink
metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
5rahim committed Jan 16, 2024
1 parent 833d531 commit e8f7e9f
Show file tree
Hide file tree
Showing 14 changed files with 55 additions and 43 deletions.
Binary file added public/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon.ico
Binary file not shown.
6 changes: 0 additions & 6 deletions public/next.svg

This file was deleted.

1 change: 1 addition & 0 deletions public/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"Chalk UI","short_name":"Chalk","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"}
4 changes: 0 additions & 4 deletions public/vercel.svg

This file was deleted.

51 changes: 22 additions & 29 deletions src/app/docs/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ import { ButtonAnatomy } from "@/workshop/button"
import { cn } from "@/workshop/core/styling"
import { ScrollArea } from "@/workshop/scroll-area"
import { allDocs } from "contentlayer/generated"

import "@/styles/mdx.css"
import { ExternalLinkIcon } from "lucide-react"
import { Metadata } from "next"
import Link from "next/link"
import { notFound } from "next/navigation"
import Balancer from "react-wrap-balancer"
import { getTableOfContents } from "../../../../lib/toc"
import { absoluteUrl } from "../../../../lib/utils"


interface DocPageProps {
Expand All @@ -30,34 +31,26 @@ async function getDocFromParams({ params }: DocPageProps) {
return doc
}

// export async function generateMetadata({
// params,
// }: DocPageProps): Promise<Metadata> {
// const doc = await getDocFromParams({ params })
//
// if (!doc) {
// return {}
// }
//
// return {
// title: doc.title,
// description: doc.description,
// openGraph: {
// title: doc.title,
// description: doc.description,
// type: "article",
// url: absoluteUrl(doc.slug),
// images: [
// {
// url: siteConfig.ogImage,
// width: 1200,
// height: 630,
// alt: siteConfig.name,
// },
// ],
// },
// }
// }
export async function generateMetadata({
params,
}: DocPageProps): Promise<Metadata> {
const doc = await getDocFromParams({ params })

if (!doc) {
return {}
}

return {
title: doc.title,
description: doc.description,
openGraph: {
title: doc.title,
description: doc.description,
type: "article",
url: absoluteUrl(doc.slug),
},
}
}

export async function generateStaticParams(): Promise<
DocPageProps["params"][]
Expand Down
Binary file removed src/app/favicon.ico
Binary file not shown.
32 changes: 30 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,36 @@ import React from "react"
const inter = Inter({ subsets: ["latin"] })

export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
title: {
default: "Chalk UI",
template: "%s - Chalk UI",
},
metadataBase: new URL("https://chalk.rahim.app"),
description: "Opinionated and flexible React components, styled with TailwindCSS, built for Next.js SaaS applications.",
keywords: [
"React",
"Next.js",
"Next.js UI",
"UI Library",
"SaaS",
"React Components",
"Tailwind CSS",
"Server Components",
"Radix UI",
],
authors: [
{
name: "5rahim",
url: "https://rahim.app",
},
],
creator: "5rahim",
icons: {
icon: "/favicon.ico",
shortcut: "/favicon-16x16.png",
apple: "/apple-touch-icon.png",
},
manifest: "https://chalk.rahim.app/site.webmanifest",
}

export default function RootLayout({
Expand Down
2 changes: 1 addition & 1 deletion src/components/component-anatomy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function ComponentAnatomy({
triggerClass="bg-[--subtle] hover:bg-[--subtle-highlight] rounded-[--radius]"
itemClass="border-none"
contentClass="px-0 py-0"
defaultValue={["types"]}
defaultValue={["types", "anatomy"]}
>
<AccordionItem value="types">
<AccordionTrigger>Types</AccordionTrigger>
Expand Down
2 changes: 1 addition & 1 deletion vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"git": {
"deploymentEnabled": {
"update": false,
"main": false
"main": true
}
}
}

0 comments on commit e8f7e9f

Please sign in to comment.