Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
content: SEO content fixes/optimisation
Richie McIlroy0cc3597592cd
diff --git a/apps/web/app/[slug]/page.tsx b/apps/web/app/[slug]/page.tsxindex 52973b188..61735869d 100644--- a/apps/web/app/[slug]/page.tsx+++ b/apps/web/app/[slug]/page.tsx@@ -1,21 +1,21 @@-import { Metadata } from "next";+import { getPageBySlug } from "@/lib/seo-pages";+import { getMetadataBySlug } from "@/lib/seo-metadata";import { notFound } from "next/navigation";-import { getPageBySlug, seoPages } from "../../lib/seo-pages";-import { getMetadataBySlug } from "../../lib/seo-metadata";+import type { Metadata } from "next";-interface PageProps {- params: {- slug: string;- };-}+type Props = {+ params: { slug: string };+};-export async function generateMetadata({- params,-}: PageProps): Promise<Metadata> {+export async function generateMetadata({ params }: Props): Promise<Metadata> {const metadata = getMetadataBySlug(params.slug);if (!metadata) {- return {};+ return {+ title: "Cap — Beautiful, shareable screen recordings.",+ description:+ "Cap is the open source alternative to Loom. Lightweight, powerful, and stunning. Record and share in seconds.",+ };}return {@@ -25,21 +25,12 @@ export async function generateMetadata({openGraph: {title: metadata.title,description: metadata.description,- images: metadata.ogImage- ? [- {- url: metadata.ogImage,- width: 1200,- height: 630,- alt: metadata.title,- },- ]- : [],+ images: [metadata.ogImage],},};}-export default function Page({ params }: PageProps) {+export default function SeoPage({ params }: Props) {const page = getPageBySlug(params.slug);if (!page) {@@ -49,9 +40,3 @@ export default function Page({ params }: PageProps) {const PageComponent = page.component;return <PageComponent />;}--export async function generateStaticParams() {- return Object.keys(seoPages).map((slug) => ({- slug,- }));-}diff --git a/apps/web/lib/seo-metadata.ts b/apps/web/lib/seo-metadata.tsindex 90d912cbc..39aa8e368 100644--- a/apps/web/lib/seo-metadata.ts+++ b/apps/web/lib/seo-metadata.ts@@ -3,9 +3,26 @@ export const seoMetadata = {title: "Screen Recorder | Cap - Beautiful Screen Recording Software",description: "Cap is a powerful, user-friendly screen recorder that offers high-quality recordings completely free. Perfect for creating tutorials, capturing gameplay, or recording professional presentations.",keywords: ["screen recorder", "screen recording", "video capture", "free screen recorder"],- ogImage: "/og/screen-recorder.png",+ ogImage: "/og.png",+ },+ 'screen-recorder-mac': {+ title: "Screen Record on Mac | Cap - Best Screen Recorder for macOS",+ description: "Cap is a powerful, user-friendly screen recorder for Mac, offering high-quality video capture with seamless functionality. Perfect for creating tutorials, presentations, and educational content on macOS.",+ keywords: ["mac screen recorder", "screen recording mac", "macos screen capture", "screen recorder for mac"],+ ogImage: "/og.png",+ },+ 'free-screen-recorder': {+ title: "Free Screen Recorder | Cap - High-Quality Recording at No Cost",+ description: "Cap offers a top-rated, free screen recorder with high-quality video capture, making it perfect for creating tutorials, educational content, and professional demos without any hidden fees.",+ keywords: ["free screen recorder", "screen recording free", "free video capture", "no cost screen recorder"],+ ogImage: "/og.png",+ },+ 'screen-recording-software': {+ title: "Screen Recording Software | Cap - Professional Video Capture Tool",+ description: "Cap is an all-in-one screen recording software offering high-quality video capture with an intuitive interface. Ideal for creating tutorials, presentations, and educational content.",+ keywords: ["screen recording software", "video capture software", "professional screen recorder", "screen capture tool"],+ ogImage: "/og.png",},- // Add more page metadata here};export const getMetadataBySlug = (slug: string) => seoMetadata[slug as keyof typeof seoMetadata];\ No newline at end of file