UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.
fix: update seo and docs
Dillion Verma5c9016c61ccc
diff --git a/app/(docs)/docs/[[...slug]]/page.tsx b/app/(docs)/docs/[[...slug]]/page.tsxindex a7aa7c1e..263ee595 100644--- a/app/(docs)/docs/[[...slug]]/page.tsx+++ b/app/(docs)/docs/[[...slug]]/page.tsx@@ -41,7 +41,7 @@ export async function generateMetadata({}return {- title: doc.title,+ title: `${doc.title} | Magic UI`,description: doc.description,openGraph: {title: doc.title,@@ -50,7 +50,7 @@ export async function generateMetadata({url: absoluteUrl(doc.slug),images: [{- url: siteConfig.ogImage,+ url: doc.image,width: 1200,height: 630,alt: siteConfig.name,@@ -61,7 +61,7 @@ export async function generateMetadata({card: "summary_large_image",title: doc.title,description: doc.description,- images: [siteConfig.ogImage],+ images: [doc.image],creator: "@shadcn",},};diff --git a/app/api/og/route.tsx b/app/api/og/route.tsxindex f6ea47d3..493d40b7 100644--- a/app/api/og/route.tsx+++ b/app/api/og/route.tsx@@ -25,7 +25,14 @@ export async function GET(req: Request) {const url = new URL(req.url);const params = Object.fromEntries(url.searchParams);- const title = capitalize((params.title || "Magic UI").replace(/-/g, " "));+ const title = capitalize(+ (params.title || "Magic UI")+ .replace(/-/g, " ")+ .split(" ")+ .slice(0, 3)+ .join(" ")+ .substring(0, 20),+ );try {return new ImageResponse(@@ -89,7 +96,7 @@ export async function GET(req: Request) {backgroundClip: "text",WebkitBackgroundClip: "text",textAlign: "center",- fontSize: 150,+ fontSize: 100,letterSpacing: "-10px",color: "transparent",WebkitTextFillColor: "transparent",diff --git a/config/site.ts b/config/site.tsindex e3fd94e8..f65f3a20 100644--- a/config/site.ts+++ b/config/site.ts@@ -1,7 +1,7 @@export const siteConfig = {name: "Magic UI",url: "https://magicui.design",- ogImage: "https://magicui.design/og.jpg",+ ogImage: "https://magicui.design/api/og",description:"Beautifully designed landing page components built with React & Tailwind CSS.",links: {diff --git a/content/docs/sections/call-to-action.mdx b/content/docs/sections/call-to-action.mdxindex fcda6626..d52e54b0 100644--- a/content/docs/sections/call-to-action.mdx+++ b/content/docs/sections/call-to-action.mdx@@ -1,5 +1,5 @@----title: Call to Action (CTA)+title: Call to Action (CTA) Sectiondate: 2024-02-27description: These components are used to build the call to action of the website.author: dillionvermadiff --git a/content/docs/sections/faq.mdx b/content/docs/sections/faq.mdxindex 9bbae973..55f8efa8 100644--- a/content/docs/sections/faq.mdx+++ b/content/docs/sections/faq.mdx@@ -1,5 +1,5 @@----title: FAQ+title: FAQ Sectiondate: 2024-02-27description: These components are used to build the faq section of the website.author: dillionvermadiff --git a/content/docs/sections/features.mdx b/content/docs/sections/features.mdxindex 99aa6ef4..11ef5d40 100644--- a/content/docs/sections/features.mdx+++ b/content/docs/sections/features.mdx@@ -1,5 +1,5 @@----title: Features+title: Features Sectiondate: 2024-02-27description: These components are used to build the features section of the website.author: dillionvermadiff --git a/content/docs/sections/footer.mdx b/content/docs/sections/footer.mdxindex 2369e88a..5e232e71 100644--- a/content/docs/sections/footer.mdx+++ b/content/docs/sections/footer.mdx@@ -1,5 +1,5 @@----title: Footer+title: Footer Sectiondate: 2024-02-27description: These components are used to build the footer of the website.author: dillionvermadiff --git a/content/docs/sections/header.mdx b/content/docs/sections/header.mdxindex 52bcd9c1..12af62a1 100644--- a/content/docs/sections/header.mdx+++ b/content/docs/sections/header.mdx@@ -1,5 +1,5 @@----title: Header+title: Header Sectiondate: 2024-03-15description: These components are used to build the header of the website.author: dillionvermadiff --git a/content/docs/sections/hero.mdx b/content/docs/sections/hero.mdxindex f54d4a5c..260e07c5 100644--- a/content/docs/sections/hero.mdx+++ b/content/docs/sections/hero.mdx@@ -1,5 +1,5 @@----title: Hero+title: Hero Sectiondate: 2024-02-27description: These components are the first thing a user sees when they land on a page. They are used to grab the user's attention and provide a brief overview of the page's content.author: dillionvermadiff --git a/content/docs/sections/pricing.mdx b/content/docs/sections/pricing.mdxindex cd7aa6fc..c24df0a5 100644--- a/content/docs/sections/pricing.mdx+++ b/content/docs/sections/pricing.mdx@@ -1,5 +1,5 @@----title: Pricing+title: Pricing Sectiondate: 2024-03-15description: These components are used to build the pricing of the website.author: dillionvermadiff --git a/content/docs/sections/social-proof-companies.mdx b/content/docs/sections/social-proof-companies.mdxindex b206aef4..ccf107c8 100644--- a/content/docs/sections/social-proof-companies.mdx+++ b/content/docs/sections/social-proof-companies.mdx@@ -1,5 +1,5 @@----title: Social Proof Companies+title: Social Proof Section (Companies)date: 2024-03-11description: These components are used to build the social proof section of the website.author: dillionvermadiff --git a/content/docs/sections/social-proof-press.mdx b/content/docs/sections/social-proof-press.mdxindex c5090732..828eeddf 100644--- a/content/docs/sections/social-proof-press.mdx+++ b/content/docs/sections/social-proof-press.mdx@@ -1,5 +1,5 @@----title: Social Proof Press+title: Social Proof Section (Press)date: 2024-03-11description: These components are used to showcase social proof of a website.author: dillionvermadiff --git a/content/docs/sections/social-proof-testimonials.mdx b/content/docs/sections/social-proof-testimonials.mdxindex 02675e7f..b8b8c035 100644--- a/content/docs/sections/social-proof-testimonials.mdx+++ b/content/docs/sections/social-proof-testimonials.mdx@@ -1,5 +1,5 @@----title: Social Proof Testimonials+title: Social Proof Section (Testimonials)date: 2024-03-15description: These components are used to build the social proof section of the website.author: dillionvermadiff --git a/content/docs/templates/startup.mdx b/content/docs/templates/startup.mdxindex bbee60fd..f943dd77 100644--- a/content/docs/templates/startup.mdx+++ b/content/docs/templates/startup.mdx@@ -1,5 +1,5 @@----title: Startup+title: Startup Templatedate: 2024-03-14description: The best landing page template for launching new ideas. Perfect for bootstrappers and pre-PMF VC backed startups.author: dillionverma