Skip to content

Commit

Permalink
feat: new SEO setup for quick spin up
Browse files Browse the repository at this point in the history
  • Loading branch information
richiemcilroy committed Nov 12, 2024
1 parent ab9a7b0 commit eb8c752
Show file tree
Hide file tree
Showing 12 changed files with 537 additions and 216 deletions.
231 changes: 56 additions & 175 deletions Cargo.lock

Large diffs are not rendered by default.

57 changes: 57 additions & 0 deletions apps/web/app/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import { Metadata } from "next";
import { notFound } from "next/navigation";
import { getPageBySlug, seoPages } from "../../lib/seo-pages";
import { getMetadataBySlug } from "../../lib/seo-metadata";

interface PageProps {
params: {
slug: string;
};
}

export async function generateMetadata({
params,
}: PageProps): Promise<Metadata> {
const metadata = getMetadataBySlug(params.slug);

if (!metadata) {
return {};
}

return {
title: metadata.title,
description: metadata.description,
keywords: metadata.keywords,
openGraph: {
title: metadata.title,
description: metadata.description,
images: metadata.ogImage
? [
{
url: metadata.ogImage,
width: 1200,
height: 630,
alt: metadata.title,
},
]
: [],
},
};
}

export default function Page({ params }: PageProps) {
const page = getPageBySlug(params.slug);

if (!page) {
notFound();
}

const PageComponent = page.component;
return <PageComponent />;
}

export async function generateStaticParams() {
return Object.keys(seoPages).map((slug) => ({
slug,
}));
}
20 changes: 14 additions & 6 deletions apps/web/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ export const Footer = () => {
<footer>
<div
style={{ boxShadow: "0px 2px 8px rgba(18, 22, 31, 0.02)" }}
className="wrapper bg-gray-100 border-[1px] border-gray-200 p-8 md:p-12 rounded-[20px] mb-10 relative overflow-hidden"
className="wrapper bg-gray-100 border-[1px] border-gray-200 p-8 lg:p-12 rounded-[20px] mb-10 relative overflow-hidden"
>
<div className="grid grid-cols-1 md:grid-cols-12 gap-8 items-start justify-between z-10 relative">
<div className="space-y-4 md:col-span-6">
<div className="grid grid-cols-1 lg:grid-cols-12 gap-8 items-start justify-between z-10 relative">
<div className="space-y-4 lg:col-span-6">
<Logo showBeta={true} className="w-[104px] h-auto" />
<p className="text-gray-500 max-w-md">
Cap is the open source alternative to Loom. Lightweight, powerful,
Expand All @@ -43,7 +43,7 @@ export const Footer = () => {
</a>
</div>
</div>
<div className="space-y-4 md:col-span-2">
<div className="space-y-4 lg:col-span-2">
<h3 className="text-lg font-semibold">Product</h3>
<ul className="space-y-2">
<li>
Expand All @@ -67,7 +67,7 @@ export const Footer = () => {
</li>
</ul>
</div>
<div className="space-y-4 md:col-span-2">
<div className="space-y-4 lg:col-span-2">
<h3 className="text-lg font-semibold">Help</h3>
<ul className="space-y-2">
<li>
Expand All @@ -88,7 +88,7 @@ export const Footer = () => {
</li>
</ul>
</div>
<div className="space-y-4 md:col-span-2">
<div className="space-y-4 lg:col-span-2">
<h3 className="text-lg font-semibold">Socials</h3>
<ul className="space-y-2">
<li>
Expand All @@ -111,6 +111,14 @@ export const Footer = () => {
</li>
</ul>
</div>
<div className="space-y-4 lg:col-span-12">
<h3 className="text-lg font-semibold">More</h3>
<ul className="space-y-2">
<li>
<a href="/screen-recorder">Screen Recorder</a>
</li>
</ul>
</div>
</div>
</div>
</footer>
Expand Down
5 changes: 3 additions & 2 deletions apps/web/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { classNames } from "@cap/utils";
export const Navbar = ({ auth }: { auth: boolean }) => {
const pathname = usePathname();
const isHomePage = pathname === "/";
const isSeoPage = pathname.startsWith("/screen-recorder");
const [showMobileMenu, setShowMobileMenu] = useState(false);

if (
Expand All @@ -38,12 +39,12 @@ export const Navbar = ({ auth }: { auth: boolean }) => {
<>
<div
className={`${
isHomePage === true
isHomePage || isSeoPage
? "bg-transparent border-transparent"
: "bg-white border-gray-200"
} border-b-[1px] w-full p-4`}
>
<div className="relative z-20 flex justify-between max-w-3xl mx-auto transition-all ">
<div className="relative z-20 flex justify-between max-w-3xl mx-auto transition-all">
<div>
<a href="/">
<Logo
Expand Down
113 changes: 113 additions & 0 deletions apps/web/components/pages/ScreenRecorderPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
"use client";

import { SeoPageTemplate } from "../seo/SeoPageTemplate";

export const screenRecorderContent = {
title: "Screen Recorder: High-Quality, User-Friendly, and 100% Free Locally",
description:
"Cap is a powerful, user-friendly screen recorder and is 100% free locally with no usage limits. Perfect for team collaboration, creating tutorials, or recording professional presentations with ease and precision.",

featuresTitle: "Key Features",
featuresDescription:
"Create stunning screen recordings with powerful collaboration features.",

features: [
{
title: "Easy to Use",
description:
"Start recording with just a few clicks. No complex setup needed.",
},
{
title: "High-Quality Recording",
description:
"Capture crystal-clear footage with smooth frame rates and synchronized audio.",
},
{
title: "Completely Free",
description:
"Enjoy professional-grade screen recording without any cost or subscription fees. The local version of Cap is 100% free with no usage limits.",
},
{
title: "Unlimited Cloud Storage",
description:
"Store and share your recordings effortlessly with unlimited cloud storage.",
},
{
title: "Advanced Team Collaboration",
description:
"Boost team productivity with features designed for efficient collaboration and easy sharing.",
},
],

useCasesTitle: "Popular Uses",
useCasesDescription:
"Explore how Cap can support your team's productivity and streamline your workflow",

useCases: [
{
title: "Team Collaboration",
description:
"Enhance teamwork with easy screen sharing for feedback and collaboration.",
},
{
title: "Tutorial Creation",
description:
"Quickly create engaging tutorials and instructional videos.",
},
{
title: "Professional Presentations",
description:
"Record polished presentations and demos for clients or internal team use.",
},
{
title: "Educational Content",
description:
"Develop high-quality educational videos or training materials with ease.",
},
],

faqsTitle: "Frequently Asked Questions",
faqs: [
{
question: "Is Cap a free screen recorder?",
answer:
"Yes, Cap offers a powerful free version, making it one of the best free screen recorders available. The local version is 100% free with no usage limits, but Cap Pro is available for users who need additional features.",
},
{
question: "How does Cap compare to OBS?",
answer:
"Cap is designed to be highly user-friendly while delivering high recording quality. It’s a simpler, yet powerful, alternative to OBS for users seeking an intuitive experience.",
},
{
question: "Can I download Cap on multiple devices?",
answer:
"Yes, Cap is cross-platform and can be downloaded on macOS and Windows, allowing you to use it across multiple devices.",
},
{
question: "What platforms does Cap support?",
answer:
"Cap is compatible with macOS and Windows, making it versatile for any user or team.",
},
{
question: "How does Cap improve team productivity?",
answer:
"Cap’s advanced collaboration features make it easy to share, review, and provide feedback on screen recordings, helping teams work more effectively together.",
},
],

video: {
url: "/videos/cap-demo.mp4",
thumbnail: "/videos/cap-demo-thumbnail.png",
alt: "Cap screen recorder demo showing high-quality and user-friendly features",
},

cta: {
title:
"Get Started with Cap – The Easy, High-Quality, and Free Screen Recorder",
buttonText: "Download Cap Free",
},
};

export const ScreenRecorderPage = () => {
return <SeoPageTemplate content={screenRecorderContent} />;
};
Loading

1 comment on commit eb8c752

@vercel
Copy link

@vercel vercel bot commented on eb8c752 Nov 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.