Skip to content

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.tsx
index 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.tsx
index 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.ts
index 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.mdx
index 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) Section
date: 2024-02-27
description: These components are used to build the call to action of the website.
author: dillionverma
diff --git a/content/docs/sections/faq.mdx b/content/docs/sections/faq.mdx
index 9bbae973..55f8efa8 100644
--- a/content/docs/sections/faq.mdx
+++ b/content/docs/sections/faq.mdx
@@ -1,5 +1,5 @@
---
-title: FAQ
+title: FAQ Section
date: 2024-02-27
description: These components are used to build the faq section of the website.
author: dillionverma
diff --git a/content/docs/sections/features.mdx b/content/docs/sections/features.mdx
index 99aa6ef4..11ef5d40 100644
--- a/content/docs/sections/features.mdx
+++ b/content/docs/sections/features.mdx
@@ -1,5 +1,5 @@
---
-title: Features
+title: Features Section
date: 2024-02-27
description: These components are used to build the features section of the website.
author: dillionverma
diff --git a/content/docs/sections/footer.mdx b/content/docs/sections/footer.mdx
index 2369e88a..5e232e71 100644
--- a/content/docs/sections/footer.mdx
+++ b/content/docs/sections/footer.mdx
@@ -1,5 +1,5 @@
---
-title: Footer
+title: Footer Section
date: 2024-02-27
description: These components are used to build the footer of the website.
author: dillionverma
diff --git a/content/docs/sections/header.mdx b/content/docs/sections/header.mdx
index 52bcd9c1..12af62a1 100644
--- a/content/docs/sections/header.mdx
+++ b/content/docs/sections/header.mdx
@@ -1,5 +1,5 @@
---
-title: Header
+title: Header Section
date: 2024-03-15
description: These components are used to build the header of the website.
author: dillionverma
diff --git a/content/docs/sections/hero.mdx b/content/docs/sections/hero.mdx
index f54d4a5c..260e07c5 100644
--- a/content/docs/sections/hero.mdx
+++ b/content/docs/sections/hero.mdx
@@ -1,5 +1,5 @@
---
-title: Hero
+title: Hero Section
date: 2024-02-27
description: 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: dillionverma
diff --git a/content/docs/sections/pricing.mdx b/content/docs/sections/pricing.mdx
index cd7aa6fc..c24df0a5 100644
--- a/content/docs/sections/pricing.mdx
+++ b/content/docs/sections/pricing.mdx
@@ -1,5 +1,5 @@
---
-title: Pricing
+title: Pricing Section
date: 2024-03-15
description: These components are used to build the pricing of the website.
author: dillionverma
diff --git a/content/docs/sections/social-proof-companies.mdx b/content/docs/sections/social-proof-companies.mdx
index 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-11
description: These components are used to build the social proof section of the website.
author: dillionverma
diff --git a/content/docs/sections/social-proof-press.mdx b/content/docs/sections/social-proof-press.mdx
index 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-11
description: These components are used to showcase social proof of a website.
author: dillionverma
diff --git a/content/docs/sections/social-proof-testimonials.mdx b/content/docs/sections/social-proof-testimonials.mdx
index 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-15
description: These components are used to build the social proof section of the website.
author: dillionverma
diff --git a/content/docs/templates/startup.mdx b/content/docs/templates/startup.mdx
index bbee60fd..f943dd77 100644
--- a/content/docs/templates/startup.mdx
+++ b/content/docs/templates/startup.mdx
@@ -1,5 +1,5 @@
---
-title: Startup
+title: Startup Template
date: 2024-03-14
description: The best landing page template for launching new ideas. Perfect for bootstrappers and pre-PMF VC backed startups.
author: dillionverma