Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat: Add new blog post + updates to blog change

Richie McIlroy4f4f4f4ff751
diff --git a/apps/embed/package.json b/apps/embed/package.json
index 2905fdb53..7c0778d85 100644
--- a/apps/embed/package.json
+++ b/apps/embed/package.json
@@ -1,6 +1,6 @@
{
"name": "embed",
- "version": "0.3.0",
+ "version": "0.3.1",
"private": true,
"scripts": {
"dev": "next dev -p 3003",
diff --git a/apps/tasks/package.json b/apps/tasks/package.json
index ef7316e54..6c5779f48 100644
--- a/apps/tasks/package.json
+++ b/apps/tasks/package.json
@@ -1,6 +1,6 @@
{
"name": "tasks",
- "version": "0.3.0",
+ "version": "0.3.1",
"private": true,
"main": "src/index.ts",
"scripts": {
diff --git a/apps/web/app/blog/[slug]/page.tsx b/apps/web/app/blog/[slug]/page.tsx
new file mode 100644
index 000000000..d9ba2fa36
--- /dev/null
+++ b/apps/web/app/blog/[slug]/page.tsx
@@ -0,0 +1,102 @@
+import { notFound } from "next/navigation";
+import Image from "next/image";
+import { format, parseISO } from "date-fns";
+import { MDXRemote } from "next-mdx-remote/rsc";
+import { getBlogPosts } from "@/utils/blog";
+import type { Metadata } from "next";
+import { Share } from "../_components/Share";
+import { ReadyToGetStarted } from "@/components/ReadyToGetStarted";
+import { calculateReadingTime } from "@/utils/readTime";
+
+interface PostProps {
+ params: {
+ slug: string;
+ };
+}
+
+export async function generateMetadata({
+ params,
+}: PostProps): Promise<Metadata | undefined> {
+ let post = getBlogPosts().find((post) => post.slug === params.slug);
+ if (!post) {
+ return;
+ }
+
+ let {
+ title,
+ publishedAt: publishedTime,
+ summary: description,
+ image,
+ } = post.metadata;
+ let ogImage = `${process.env.NEXT_PUBLIC_URL}${image}`;
+
+ return {
+ title,
+ description,
+ openGraph: {
+ title,
+ description,
+ type: "article",
+ publishedTime,
+ url: `${process.env.NEXT_PUBLIC_URL}/blog/${post.slug}`,
+ images: [
+ {
+ url: ogImage,
+ },
+ ],
+ },
+ twitter: {
+ card: "summary_large_image",
+ title,
+ description,
+ images: [ogImage],
+ },
+ };
+}
+
+export default async function PostPage({ params }: PostProps) {
+ const post = getBlogPosts().find((post) => post.slug === params.slug);
+
+ if (!post) {
+ notFound();
+ }
+
+ const readingTime = calculateReadingTime(post.content);
+
+ return (
+ <>
+ <article className="py-8 prose mx-auto ">
+ {post.metadata.image && (
+ <div className="relative mb-12 h-[345px] w-full">
+ <Image
+ className="m-0 w-full rounded-lg object-contain sm:object-cover"
+ src={post.metadata.image}
+ alt={post.metadata.title}
+ fill
+ priority
+ />
+ </div>
+ )}
+
+ <div className="wrapper">
+ <header>
+ <h1 className="mb-2">{post.metadata.title}</h1>
+ <p className="space-x-1 text-xs text-gray-500">
+ <span>
+ {format(parseISO(post.metadata.publishedAt), "MMMM dd, yyyy")}
+ </span>
+ <span>—</span>
+ <span>{readingTime} min read</span>
+ </p>
+ </header>
+ <hr className="my-6" />
+ <MDXRemote source={post.content} />
+ <Share post={post} />
+ </div>
+ </article>
+ <div className="wrapper mb-4">
+ <ReadyToGetStarted />
+ </div>
+ </>
+ );
+}
diff --git a/apps/web/app/blog/_components/Share.tsx b/apps/web/app/blog/_components/Share.tsx
new file mode 100644
index 000000000..407614402
--- /dev/null
+++ b/apps/web/app/blog/_components/Share.tsx
@@ -0,0 +1,59 @@
+"use client";
+
+import toast from "react-hot-toast";
+import { useState } from "react";
+
+interface ShareProps {
+ post: {
+ slug: string;
+ metadata: {
+ title: string;
+ };
+ };
+}
+
+export function Share({ post }: ShareProps) {
+ const shareUrl = `${process.env.NEXT_PUBLIC_URL}/blog/${post.slug}`;
+ const [copied, setCopied] = useState(false);
+
+ return (
+ <>
+ <div className="mt-6 py-6 px-3 bg-gray-100 text-center rounded-xl">
+ <h3 className="mb-2 mt-0 text-lg font-semibold">Share this post</h3>
+ <div className="flex justify-center gap-4">
+ <a
+ href={`https://twitter.com/intent/tweet?text=${encodeURIComponent(
+ post.metadata.title
+ )}&url=${encodeURIComponent(shareUrl)}`}
+ target="_blank"
+ rel="noopener noreferrer"
+ className="text-lg text-gray-600 hover:text-blue-500 hover:underline"
+ >
+ Twitter
+ </a>
+ <a
+ href={`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(
+ shareUrl
+ )}`}
+ target="_blank"
+ rel="noopener noreferrer"
+ className="text-lg text-gray-600 hover:text-blue-700 hover:underline"
+ >
+ LinkedIn
+ </a>
+ <button
+ onClick={() => {
+ navigator.clipboard.writeText(shareUrl);
+ toast.success("Link copied to clipboard");
+ setCopied(true);
+ setTimeout(() => setCopied(false), 2000);
+ }}
+ className="text-lg text-gray-600 hover:text-gray-900 underline"
+ >
+ {copied ? "Link copied" : "Copy Link"}
+ </button>
+ </div>
+ </div>
+ </>
+ );
+}
diff --git a/apps/web/app/updates/_components/UpdatePage.tsx b/apps/web/app/blog/_components/UpdatePage.tsx
similarity index 96%
rename from apps/web/app/updates/_components/UpdatePage.tsx
rename to apps/web/app/blog/_components/UpdatePage.tsx
index fbac866ff..e4ee57cde 100644
--- a/apps/web/app/updates/_components/UpdatePage.tsx
+++ b/apps/web/app/blog/_components/UpdatePage.tsx
@@ -4,7 +4,7 @@ import Image from "next/image";
import Link from "next/link";
import { format, parseISO } from "date-fns";
import { MDXRemote } from "next-mdx-remote/rsc";
-import { getBlogPosts } from "@/utils/updates";
+import { getBlogPosts } from "@/utils/blog";
export const UpdatePage = ({ postSlug }: { postSlug: string }) => {
const post = getBlogPosts().find((post) => post.slug === postSlug);
diff --git a/apps/web/app/updates/page.tsx b/apps/web/app/blog/page.tsx
similarity index 87%
rename from apps/web/app/updates/page.tsx
rename to apps/web/app/blog/page.tsx
index cc71f3373..3cbd2890f 100644
--- a/apps/web/app/updates/page.tsx
+++ b/apps/web/app/blog/page.tsx
@@ -2,7 +2,7 @@ import { UpdatesPage } from "@/components/pages/UpdatesPage";
import { Metadata } from "next";
export const metadata: Metadata = {
- title: "Updates — Cap",
+ title: "Blog — Cap",
};
export default function App() {
diff --git a/apps/web/app/docs/[slug]/page.tsx b/apps/web/app/docs/[slug]/page.tsx
index ecc4a8d0e..818843ddf 100644
--- a/apps/web/app/docs/[slug]/page.tsx
+++ b/apps/web/app/docs/[slug]/page.tsx
@@ -1,7 +1,7 @@
import { notFound } from "next/navigation";
import Image from "next/image";
import { MDXRemote } from "next-mdx-remote/rsc";
-import { getDocs } from "@/utils/updates";
+import { getDocs } from "@/utils/blog";
import type { Metadata } from "next";
interface DocProps {
diff --git a/apps/web/app/docs/_components/DocPage.tsx b/apps/web/app/docs/_components/DocPage.tsx
index 4dbeb94d8..660a27b52 100644
--- a/apps/web/app/docs/_components/DocPage.tsx
+++ b/apps/web/app/docs/_components/DocPage.tsx
@@ -2,7 +2,7 @@
import Image from "next/image";
import { MDXRemote } from "next-mdx-remote/rsc";
-import { getDocs } from "@/utils/updates";
+import { getDocs } from "@/utils/blog";
export const DocPage = ({ docSlug }: { docSlug: string }) => {
const doc = getDocs().find((doc) => doc.slug === docSlug);
diff --git a/apps/web/app/globals.css b/apps/web/app/globals.css
index fd11c26af..5fb3ace1b 100644
--- a/apps/web/app/globals.css
+++ b/apps/web/app/globals.css
@@ -398,6 +398,10 @@ footer a {
@apply text-2xl font-semibold mt-6;
}
-.prose p {
- @apply text-lg text-gray-400;
+.prose p, .prose li, .prose a {
+ @apply tracking-tight font-normal text-[1.125rem] leading-[1.75rem] !important;
}
+
+.prose p, .prose li {
+ @apply text-gray-500/80 !important;
+}
\ No newline at end of file
diff --git a/apps/web/app/robots.ts b/apps/web/app/robots.ts
index 4b2775f9a..a3c5b60f9 100644
--- a/apps/web/app/robots.ts
+++ b/apps/web/app/robots.ts
@@ -13,7 +13,7 @@ export default function robots(): MetadataRoute.Robots {
userAgent: '*',
allow: [
'/',
- '/updates/',
+ '/blog/',
// Dynamically add all SEO pages
...seoPageSlugs.map(slug => `/${slug}`),
],
diff --git a/apps/web/app/sitemap.ts b/apps/web/app/sitemap.ts
index 73b3db4f4..6bbcca0b8 100644
--- a/apps/web/app/sitemap.ts
+++ b/apps/web/app/sitemap.ts
@@ -1,6 +1,6 @@
import { promises as fs } from "fs";
import path from "path";
-import { getBlogPosts } from "@/utils/updates";
+import { getBlogPosts } from "@/utils/blog";
import { seoPages } from "../lib/seo-pages";
async function getPagePaths(
@@ -15,7 +15,7 @@ async function getPagePaths(
entry.isDirectory() &&
entry.name !== "dashboard" &&
!entry.name.startsWith("s") &&
- entry.name !== "updates" &&
+ entry.name !== "blog" &&
!entry.name.startsWith("[")
) {
const subPaths = await getPagePaths(fullPath);
@@ -53,7 +53,7 @@ export default async function sitemap() {
const publishDate = new Date(post.metadata.publishedAt);
publishDate.setHours(9, 0, 0, 0); // Set time to 9:00 AM
return {
- path: `/updates/${post.slug}`,
+ path: `/blog/${post.slug}`,
lastModified: publishDate.toISOString(),
};
});
diff --git a/apps/web/app/updates/[slug]/page.tsx b/apps/web/app/updates/[slug]/page.tsx
deleted file mode 100644
index 93434b395..000000000
--- a/apps/web/app/updates/[slug]/page.tsx
+++ /dev/null
@@ -1,90 +0,0 @@
-import { notFound } from "next/navigation";
-import Image from "next/image";
-import { format, parseISO } from "date-fns";
-import { MDXRemote } from "next-mdx-remote/rsc";
-import { getBlogPosts } from "@/utils/updates";
-import type { Metadata } from "next";
-
-interface PostProps {
- params: {
- slug: string;
- };
-}
-
-export async function generateMetadata({
- params,
-}: PostProps): Promise<Metadata | undefined> {
- let post = getBlogPosts().find((post) => post.slug === params.slug);
- if (!post) {
- return;
- }
-
- let {
- title,
- publishedAt: publishedTime,
- summary: description,
- image,
- } = post.metadata;
- let ogImage = `${process.env.NEXT_PUBLIC_URL}${image}`;
-
- return {
- title,
- description,
- openGraph: {
- title,
- description,
- type: "article",
- publishedTime,
- url: `${process.env.NEXT_PUBLIC_URL}/updates/${post.slug}`,
- images: [
- {
- url: ogImage,
- },
- ],
- },
- twitter: {
- card: "summary_large_image",
- title,
- description,
- images: [ogImage],
- },
- };
-}
-
-export default async function PostPage({ params }: PostProps) {
- const post = getBlogPosts().find((post) => post.slug === params.slug);
-
- if (!post) {
- notFound();
- }
-
- return (
- <article className="py-8 prose mx-auto">
- {post.metadata.image && (
- <div className="relative mb-12 h-[345px] w-full">
- <Image
- className="m-0 w-full rounded-lg object-contain sm:object-cover"
- src={post.metadata.image}
- alt={post.metadata.title}
- fill
- priority
- sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
- />
- </div>
- )}
-
- <div className="wrapper">
- <header>
- <h1 className="mb-2">{post.metadata.title}</h1>
- <p className="space-x-1 text-xs text-gray-500">
- <span>
- {format(parseISO(post.metadata.publishedAt), "MMMM dd, yyyy")}
- </span>
- </p>
- </header>
- <hr className="my-6" />
- <MDXRemote source={post.content} />
- </div>
- </article>
- );
-}
diff --git a/apps/web/components/Footer.tsx b/apps/web/components/Footer.tsx
index 7c4b44da2..5f4aabaf0 100644
--- a/apps/web/components/Footer.tsx
+++ b/apps/web/components/Footer.tsx
@@ -49,7 +49,7 @@ export const Footer = () => {
<h3 className="text-lg font-semibold">Product</h3>
<ul className="space-y-2">
<li>
- <a href="/updates">Updates</a>
+ <a href="/blog">Blog</a>
</li>
<li>
<a href="/docs">Docs</a>
diff --git a/apps/web/components/Navbar.tsx b/apps/web/components/Navbar.tsx
index 60f47ca92..41ecef181 100644
--- a/apps/web/components/Navbar.tsx
+++ b/apps/web/components/Navbar.tsx
@@ -114,7 +114,7 @@ export const Navbar = ({ auth }: { auth: boolean }) => {
</Link>
</NavigationMenuItem>
<NavigationMenuItem>
- <Link href="/updates" legacyBehavior passHref>
+ <Link href="/blog" legacyBehavior passHref>
<NavigationMenuLink
className={classNames(
navigationMenuTriggerStyle(),
@@ -123,7 +123,7 @@ export const Navbar = ({ auth }: { auth: boolean }) => {
: ""
)}
>
- Updates
+ Blog
</NavigationMenuLink>
</Link>
</NavigationMenuItem>
diff --git a/apps/web/components/ReadyToGetStarted.tsx b/apps/web/components/ReadyToGetStarted.tsx
new file mode 100644
index 000000000..bc4747525
--- /dev/null
+++ b/apps/web/components/ReadyToGetStarted.tsx
@@ -0,0 +1,63 @@
+"use client";
+
+import { Button } from "@cap/ui";
+
+export function ReadyToGetStarted() {
+ return (
+ <div
+ className="custom-bg max-w-[1000px] mx-auto rounded-[20px] overflow-hidden relative flex flex-col justify-center p-8"
+ style={{ minHeight: "264px" }}
+ >
+ <div
+ id="cloud-4"
+ className="absolute top-0 -right-20 opacity-50 z-0 pointer-events-none"
+ >
+ <img
+ className="max-w-[40vw] h-auto"
+ src="/illustrations/cloud-1.png"
+ alt="Footer Cloud One"
+ />
+ </div>
+ <div
+ id="cloud-5"
+ className="absolute bottom-0 left-0 opacity-50 z-0 pointer-events-none"
+ >
+ <img
+ className="max-w-[40vw] h-auto"
+ src="/illustrations/cloud-2.png"
+ alt="Footer Cloud Two"
+ />
+ </div>
+ <div className="wrapper mx-auto h-full flex flex-col justify-center items-center relative z-10">
+ <div className="text-center max-w-[800px] mx-auto mb-8">
+ <h2 className="text-xl sm:text-3xl text-white mb-3">
+ Beautiful screen recordings, owned by you.
+ </h2>
+ <p className="text-[1rem] sm:text-lg text-white">
+ Cap is the open source alternative to Loom. Lightweight, powerful,
+ and stunning. Record and share securely in seconds with custom S3
+ bucket support.
+ </p>
+ </div>
+ <div className="flex flex-col sm:flex-row items-center justify-center space-y-2 sm:space-y-0 sm:space-x-2">
+ <Button
+ variant="white"
+ href="/pricing"
+ size="lg"
+ className="w-full sm:w-auto"
+ >
+ Get Started
+ </Button>
+ <Button
+ variant="secondary"
+ href="/download"
+ size="lg"
+ className="w-full sm:w-auto"
+ >
+ Download App
+ </Button>
+ </div>
+ </div>
+ </div>
+ );
+}
diff --git a/apps/web/components/pages/DocsPage.tsx b/apps/web/components/pages/DocsPage.tsx
index efb301db5..243942b59 100644
--- a/apps/web/components/pages/DocsPage.tsx
+++ b/apps/web/components/pages/DocsPage.tsx
@@ -1,6 +1,6 @@
import Link from "next/link";
import Image from "next/image";
-import { getDocs } from "@/utils/updates";
+import { getDocs } from "@/utils/blog";
export const DocsPage = () => {
const allDocs = getDocs();
diff --git a/apps/web/components/pages/HomePage.tsx b/apps/web/components/pages/HomePage.tsx
index 196aefcbc..892cc3579 100644
--- a/apps/web/components/pages/HomePage.tsx
+++ b/apps/web/components/pages/HomePage.tsx
@@ -9,6 +9,7 @@ import { Button } from "@cap/ui";
import Link from "next/link";
import { useEffect } from "react";
import { LogoSection } from "./_components/LogoSection";
+import { ReadyToGetStarted } from "@/components/ReadyToGetStarted";
export const HomePage = () => {
useEffect(() => {
@@ -107,7 +108,7 @@ export const HomePage = () => {
</div>
{/* <Link
- href="/updates/cap-v03-launch"
+ href="/blog/cap-v03-launch"
className="mx-auto mb-4 inline-flex justify-center font-medium transition-colors focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 bg-blue-400 hover:bg-blue-500 h-9 px-4 py-2 rounded-full space-x-2 items-center animate-pulse"
>
<span className="text-sm text-white">
@@ -227,129 +228,6 @@ export const HomePage = () => {
></path>
</svg>
</div>
- <div className="text-center max-w-[800px] mx-auto mb-8">
- <h2 className="mb-3">
- Capture your screen effortlessly,
- <br />
- share it instantly.
- </h2>
- <p className="text-[1.125rem] leading-[1.75rem]">
- Tired of spending ages setting up screen recordings and editing
- videos? We&apos;ve made it super easy. Whether you&apos;re recording
- a tutorial, presentation, or just showing something off, you&apos;ll
- get it done faster without the stress.
- </p>
- </div>
- <div className="grid grid-cols-1 md:grid-cols-2 max-w-[1000px] mx-auto gap-4">
- <div
- className="border-[1px] border-gray-200 rounded-[20px] overflow-hidden"
- style={{
- boxShadow: "0px 2px 8px rgba(18, 22, 31, 0.02)",
- }}
- >
- <div>
- <img
- className="w-full h-auto"
- src="/features/app-view.png"
- alt="App View Illustration"
- />
- </div>
- <div className="p-4">
- <h3 className="text-[1.125rem] leading-[1.75rem] text-gray-500 font-medium">
- A tool that just works.
- </h3>
- <p className="text-[1.125rem] leading-[1.75rem] text-gray-400">
- No more complicated software that slows you down. Our app feels
- natural and smooth from the moment you open it.
- </p>
- </div>
- </div>
- <div
- className="border-[1px] border-gray-200 rounded-[20px] overflow-hidden"
- style={{
- boxShadow: "0px 2px 8px rgba(18, 22, 31, 0.02)",
- }}
- >
- <div>
- <img
- className="w-full h-auto"
- src="/features/record-view.png"
- alt="Record View Illustration"
- />
- </div>
- <div className="p-4">
- <h3 className="text-[1.125rem] leading-[1.75rem] text-gray-500 font-medium">
- Click, record, done.
- </h3>
- <p className="text-[1.125rem] leading-[1.75rem] text-gray-400">
- Recording your screen shouldn&apos;t be rocket science. Just hit
- record, and we&apos;ll take care of the rest.
- </p>
- </div>
- </div>
- <div
- className="border-[1px] border-gray-200 rounded-[20px] overflow-hidden"
- style={{
- boxShadow: "0px 2px 8px rgba(18, 22, 31, 0.02)",
- }}
- >
- <div>
- <img
- className="w-full h-auto"
- src="/features/editor-view.png"
- alt="Editor View Illustration"
- />
- </div>
- <div className="p-4">
- <h3 className="text-[1.125rem] leading-[1.75rem] text-gray-500 font-medium">
- Edit like a pro — no skills required.
- </h3>
- <p className="text-[1.125rem] leading-[1.75rem] text-gray-400">
- Editing doesn&apos;t have to be hard. Our tool makes it a breeze
- to polish your video, so you can focus on what matters — getting
- your message out there.
- </p>
- </div>
- </div>
- <div
- className="border-[1px] border-gray-200 rounded-[20px] overflow-hidden"
- style={{
- boxShadow: "0px 2px 8px rgba(18, 22, 31, 0.02)",
- }}
- >
- <div>
- <img
- className="w-full h-auto"
- src="/features/share-view.png"
- alt="Share View Illustration"
- />
- </div>
- <div className="p-4">
- <h3 className="text-[1.125rem] leading-[1.75rem] text-gray-500 font-medium">
- Instantly share your video with anyone, anywhere.
- </h3>
- <p className="text-[1.125rem] leading-[1.75rem] text-gray-400">
- Hit share, and your video is live. No waiting, no fuss — just
- quick, simple sharing, wherever you need it to go.
- </p>
- </div>
- </div>
- </div>
- </div>
- <div className="wrapper pb-32 md:pb-40">
- <div className="mb-4">
- <svg
- xmlns="http://www.w3.org/2000/svg"
- className="w-[84px] h-auto mx-auto"
- fill="none"
- viewBox="0 0 84 25"
- >
- <path
- fill="#8991A3"
- d="M12.283 15.264c-.17.235-.362.395-.576.48a2.027 2.027 0 01-.576.096 1.697 1.697 0 01-.832-.288c-.256-.192-.416-.384-.48-.576a73.92 73.92 0 01-.416-1.216l-.448-1.344c-.128-.47-.266-.917-.416-1.344-.149-.448-.288-.853-.416-1.216a46.406 46.406 0 00-1.216 2.272c-.384.747-.81 1.526-1.28 2.336-.213.32-.458.544-.736.672-.277.107-.512.15-.704.128a1.359 1.359 0 01-.768-.32 3.906 3.906 0 01-.512-.544 9.584 9.584 0 01-.704-1.472 40.314 40.314 0 01-.672-1.92 96.671 96.671 0 01-.544-2.016C.817 8.31.678 7.702.571 7.168a2.752 2.752 0 010-1.024c.086-.32.278-.501.576-.544.363-.021.694.107.992.384.3.256.47.512.512.768.086.427.182.896.288 1.408.128.49.256.992.384 1.504.15.512.288 1.014.416 1.504.15.49.3.928.448 1.312.32-.512.672-1.098 1.056-1.76.406-.682.79-1.333 1.152-1.952.363-.64.694-1.194.992-1.664.3-.47.534-.757.704-.864.128-.085.31-.074.544.032.235.086.406.214.512.384.47.939.854 1.974 1.152 3.104.32 1.11.63 2.144.928 3.104.3-.384.62-.885.96-1.504.342-.64.672-1.312.992-2.016.32-.704.62-1.408.896-2.112a26.38 26.38 0 00.672-1.888c.171-.576.406-.853.704-.832.384.043.715.171.992.384.278.214.384.438.32.672-.469 1.878-1.077 3.606-1.824 5.184a31.225 31.225 0 01-2.656 4.512zM20.679 1.824c0 .512-.01 1.088-.032 1.728v1.984c.021.683.032 1.387.032 2.112.021.726.043 1.419.064 2.08.213-.426.47-.842.768-1.248.299-.426.63-.8.992-1.12.384-.32.779-.576 1.184-.768a3.314 3.314 0 011.376-.288c.533 0 1.003.17 1.408.512.427.342.79.8 1.088 1.376.32.555.587 1.184.8 1.888.213.683.384 1.387.512 2.112.15.704.256 1.387.32 2.048.064.64.117 1.195.16 1.664 0 .342-.085.619-.256.832-.17.214-.373.32-.608.32-.17 0-.384-.106-.64-.32a2.1 2.1 0 01-.512-.832c-.064-.256-.128-.63-.192-1.12a68.774 68.774 0 00-.224-1.568 24.527 24.527 0 00-.32-1.728 8.696 8.696 0 00-.48-1.536c-.17-.469-.384-.832-.64-1.088-.256-.256-.555-.352-.896-.288-.533.107-1.003.48-1.408 1.12-.384.64-.725 1.366-1.024 2.176a24.92 24.92 0 00-.704 2.464c-.17.832-.299 1.504-.384 2.016-.085.384-.203.65-.352.8a.614.614 0 01-.448.192c-.17 0-.33-.085-.48-.256a5.042 5.042 0 01-.384-.608 11.3 11.3 0 01-.288-.768 3.972 3.972 0 01-.16-.704c-.107-1.152-.192-2.25-.256-3.296a160.869 160.869 0 01-.16-3.2 163.526 163.526 0 01-.032-3.264c0-1.13.021-2.336.064-3.616 0-1.066.384-1.546 1.152-1.44.256.043.48.235.672.576.192.32.288.672.288 1.056zM40.938 5.92l.192 3.488a31.82 31.82 0 01.064 3.488c-.043 1.13-.16 2.24-.352 3.328a13.203 13.203 0 01-.896 3.136 11.028 11.028 0 01-1.728 2.752c-.704.854-1.6 1.622-2.688 2.304a1.32 1.32 0 01-.576.192 1.75 1.75 0 01-.576-.032 1.314 1.314 0 01-.512-.16.48.48 0 01-.288-.288c-.064-.192-.032-.405.096-.64.128-.234.341-.48.64-.736.938-.704 1.728-1.45 2.368-2.24.64-.79 1.152-1.642 1.536-2.56.384-.917.629-1.91.736-2.976.128-1.088.128-2.272 0-3.552-.256.32-.555.65-.896.992-.342.342-.704.65-1.088.928-.384.256-.779.48-1.184.672-.406.17-.79.256-1.152.256-.299 0-.598-.064-.896-.192-.299-.128-.598-.373-.896-.736a9.441 9.441 0 01-.928-1.504c-.256-.576-.48-1.13-.672-1.664a28.368 28.368 0 01-.48-1.44 8.927 8.927 0 01-.192-.896 1.458 1.458 0 010-.608c.042-.192.181-.31.416-.352.32-.064.618-.042.896.064.277.107.469.278.576.512.085.235.202.598.352 1.088.149.49.33.982.544 1.472.213.47.437.886.672 1.248.256.363.522.544.8.544.32 0 .693-.16 1.12-.48.448-.32.874-.736 1.28-1.248a7.974 7.974 0 001.024-1.696c.298-.64.448-1.258.448-1.856 0-.128.021-.277.064-.448.042-.17.106-.33.192-.48.085-.17.181-.31.288-.416.128-.128.256-.202.384-.224.341-.042.64.054.896.288.277.214.416.438.416.672zM59.066 7.776a.894.894 0 01-.544.096c-.213-.042-.394-.181-.544-.416-.34-.448-.757-.672-1.248-.672-.448 0-.853.107-1.216.32-.34.192-.65.459-.928.8-.256.32-.469.683-.64 1.088-.17.406-.288.81-.352 1.216-.106.747.022 1.376.384 1.888.363.512.928.768 1.696.768.62.022 1.312-.096 2.08-.352.79-.277 1.526-.63 2.208-1.056a2.7 2.7 0 01.832-.224c.256-.021.47.107.64.384.214.342.16.694-.16 1.056-.32.342-.746.65-1.28.928-.533.299-1.098.566-1.696.8-.576.214-1.162.374-1.76.48a6.306 6.306 0 01-1.792 0 4.22 4.22 0 01-1.632-.608c-.81-.554-1.3-1.344-1.472-2.368-.17-1.024-.096-2.08.224-3.168.128-.405.31-.81.544-1.216.235-.426.512-.81.832-1.152.342-.341.715-.63 1.12-.864a3.668 3.668 0 011.344-.512 4.122 4.122 0 012.272.256c.726.278 1.206.8 1.44 1.568.043.171.043.352 0 .544-.042.17-.16.31-.352.416zM70.66 4.16c.086.598.15 1.238.192 1.92.064.662.107 1.334.128 2.016.043.683.064 1.344.064 1.984 0 .64-.01 1.216-.032 1.728.683.47 1.088.886 1.216 1.248.15.363.17.683.064.96-.128.384-.362.587-.704.608-.32 0-.693-.117-1.12-.352-.299.214-.64.448-1.024.704-.384.235-.79.47-1.216.704-.426.214-.853.406-1.28.576-.426.17-.821.288-1.184.352-.682.107-1.301-.021-1.856-.384-.533-.362-.896-.906-1.088-1.632a3.96 3.96 0 01-.096-1.504 4.143 4.143 0 01.48-1.504c.256-.49.597-.928 1.024-1.312a4.93 4.93 0 011.568-.896 2.73 2.73 0 01.608-.16c.278-.042.555-.053.832-.032.299 0 .597.054.896.16.299.107.576.288.832.544 0-.362-.01-.757-.032-1.184 0-.448-.01-.896-.032-1.344a20.028 20.028 0 00-.096-1.248 10.584 10.584 0 00-.096-1.024c-.043-.32-.17-.512-.384-.576-.192-.085-.437-.074-.736.032-.512.171-1.11.502-1.792.992a23.225 23.225 0 00-1.952 1.568.817.817 0 01-.672.256.96.96 0 01-.608-.288.933.933 0 01-.288-.576c-.021-.234.064-.48.256-.736.363-.384.768-.778 1.216-1.184.448-.405.917-.768 1.408-1.088.49-.341.992-.618 1.504-.832a4.456 4.456 0 011.536-.352c.747-.021 1.323.15 1.728.512.405.342.65.79.736 1.344zm-3.712 6.88c-.277.064-.576.203-.896.416a3.819 3.819 0 00-.832.736 3.032 3.032 0 00-.544.96 1.678 1.678 0 000 1.024.485.485 0 00.256.288c.15.064.31.075.48.032.512-.106 1.088-.31 1.728-.608.662-.32 1.184-.661 1.568-1.024 0-.128-.064-.288-.192-.48a4.055 4.055 0 00-.448-.608 2.772 2.772 0 00-.576-.544c-.192-.15-.373-.213-.544-.192zM78.96 19.488a1.025 1.025 0 01-.32.64c-.192.214-.405.31-.64.288-.362-.021-.64-.16-.832-.416-.192-.256-.288-.47-.288-.64 0-.81-.021-1.653-.064-2.528-.043-.896-.096-1.813-.16-2.752a1.534 1.534 0 01-.768-.064.895.895 0 01-.448-.48c-.15-.362-.128-.682.064-.96.192-.277.501-.544.928-.8a638.62 638.62 0 00-.32-2.336 63.75 63.75 0 00-.288-2.24.646.646 0 01.032-.352c.043-.106.096-.202.16-.288.064-.106.181-.202.352-.288.278-.106.587-.021.928.256.363.278.608.63.736 1.056.064.406.128.875.192 1.408.085.512.16 1.078.224 1.696.448-.277.864-.576 1.248-.896a5.81 5.81 0 001.024-1.024 4.11 4.11 0 00.672-1.12c.15-.405.192-.821.128-1.248a1.594 1.594 0 00-.48-.96c-.277-.298-.715-.458-1.312-.48a6.755 6.755 0 00-1.6.128c-.512.107-1.024.246-1.536.416-.49.171-.981.374-1.472.608-.47.235-.928.47-1.376.704a1.56 1.56 0 01-.896.224c-.277-.042-.459-.149-.544-.32-.192-.426-.181-.81.032-1.152.235-.341.587-.661 1.056-.96.406-.234.886-.469 1.44-.704a12.76 12.76 0 011.792-.64c.64-.192 1.28-.32 1.92-.384a6.189 6.189 0 011.888.032c.597.086 1.13.288 1.6.608.49.299.886.747 1.184 1.344.363.982.459 1.888.288 2.72-.15.811-.47 1.558-.96 2.24a8.855 8.855 0 01-1.76 1.824 21.398 21.398 0 01-2.08 1.44c.107 1.152.181 2.294.224 3.424.043 1.13.053 2.123.032 2.976z"
- ></path>
- </svg>
- </div>
<div className="text-center max-w-[800px] mx-auto mb-8">
<h2 className="mb-3">Crafted for simplicity</h2>
<p className="text-[1.125rem] leading-[1.75rem]">
@@ -389,73 +267,9 @@ export const HomePage = () => {
</div>
</div>
</div>
- <div
- className="wrapper custom-bg max-w-[1000px] mx-auto rounded-[20px] overflow-hidden mb-32 md:mb-40 relative flex flex-col justify-center p-8"
- style={{ minHeight: "264px" }}
- >
- <div
- id="cloud-4"
- className="absolute top-0 -right-20 opacity-50 z-0 pointer-events-none"
- >
- <img
- className="max-w-[40vw] h-auto"
- src="/illustrations/cloud-1.png"
- alt="Footer Cloud One"
- />
- </div>
- <div
- id="cloud-5"
- className="absolute bottom-0 left-0 opacity-50 z-0 pointer-events-none"
- >
- <img
- className="max-w-[40vw] h-auto"
- src="/illustrations/cloud-2.png"
- alt="Footer Cloud Two"
- />
- </div>
- <div className="wrapper mx-auto h-full flex flex-col justify-center items-center relative z-10">
- <div className="text-center max-w-[800px] mx-auto mb-8">
- <h2 className="text-white mb-3">Ready to get started?</h2>
- <p className="text-[1.125rem] leading-[1.75rem] text-white">
- Join thousands of users who are already enjoying Cap's beautiful,
- shareable screen recordings. Start creating stunning videos today!
- </p>
- </div>
- <div className="flex flex-col sm:flex-row items-center justify-center space-y-2 sm:space-y-0 sm:space-x-2">
- <Button
- variant="white"
- href="/pricing"
- size="lg"
- className="w-full sm:w-auto"
- >
- Get Started
- </Button>
- <Button
- variant="secondary"
- href="/download"
- size="lg"
- className="w-full sm:w-auto"
- >
- Download App
- </Button>
- </div>
- </div>
+ <div className="mb-32 md:mb-40">
+ <ReadyToGetStarted />
</div>
- {/* <div className="pt-6 pb-16 md:pt-16 md:pb-32">
- <div className="wrapper">
- <div
- className="senja-embed"
- data-id="b40c5cc6-3d88-468e-a763-c7e515c3f000"
- data-lazyload="false"
- data-mode="shadow"
- />
- <script
- async
- src="https://widget.senja.io/widget/b40c5cc6-3d88-468e-a763-c7e515c3f000/platform.js"
- type="text/javascript"
- />
- </div>
- </div> */}
</ParallaxProvider>
);
};
diff --git a/apps/web/components/pages/UpdatesPage.tsx b/apps/web/components/pages/UpdatesPage.tsx
index d8bd36f80..7a6650e2c 100644
--- a/apps/web/components/pages/UpdatesPage.tsx
+++ b/apps/web/components/pages/UpdatesPage.tsx
@@ -1,7 +1,7 @@
import Link from "next/link";
import Image from "next/image";
import { format, parseISO } from "date-fns";
-import { getBlogPosts } from "@/utils/updates";
+import { getBlogPosts } from "@/utils/blog";
export const UpdatesPage = () => {
const allUpdates = getBlogPosts();
@@ -9,7 +9,7 @@ export const UpdatesPage = () => {
return (
<div className="wrapper wrapper-sm py-20">
<div className="text-center page-intro mb-14">
- <h1>Updates</h1>
+ <h1>Blog</h1>
</div>
<div>
<div className="space-y-8">
@@ -21,7 +21,7 @@ export const UpdatesPage = () => {
key={post.slug}
className="w-full rounded-xl overflow-hidden border"
>
- <Link href={"/updates/" + post.slug}>
+ <Link href={"/blog/" + post.slug}>
{post.metadata.image && (
<div className="w-full border-b">
<Image
diff --git a/apps/web/content/updates/cap-public-beta-launch.mdx b/apps/web/content/blog/cap-public-beta-launch.mdx
similarity index 94%
rename from apps/web/content/updates/cap-public-beta-launch.mdx
rename to apps/web/content/blog/cap-public-beta-launch.mdx
index fd80957c1..5a5694440 100644
--- a/apps/web/content/updates/cap-public-beta-launch.mdx
+++ b/apps/web/content/blog/cap-public-beta-launch.mdx
@@ -3,7 +3,7 @@ title: Cap Public Beta Release
description: After 6 long months of development, Cap has officially launched in public beta.
publishedAt: "2024-04-25"
category: Release
-image: /updates/cap-beta-release.jpg
+image: /blog/cap-beta-release.jpg
author: Richie McIlroy
tags: News, Updates, Release
---
@@ -26,13 +26,13 @@ With either the browser or macOS app, you select your recording options (webcam,
You can access the Cap browser app on any desktop computer (Windows, Linux, macOS). This is the easiest way to get started with Cap, and requires no download. You can record your entire screen or just a specific window or tab, with your webcam overlayed. It's also very easy to resize and change the position of it in your recording.
-![Cap Web App Screenshot](/updates/cap-web-app.png)
+![Cap Web App Screenshot](/blog/cap-web-app.png)
## Cap macOS App
It's still very early days for the macOS app, but after a bunch of testing, the app is now stable enough to reliably take screen recordings of your desktop. Right now you can only record the entire screen, but more options are coming soon, as well as Windows and Linux releases. If you'd like to contribute to the Windows release, we are always looking for more [contributors](https://github.com/CapSoftware/Cap).
-![enter image description here](/updates/cap-emoji-banner.png)
+![enter image description here](/blog/cap-emoji-banner.png)
## Upcoming Features
diff --git a/apps/web/content/updates/cap-v03-launch.mdx b/apps/web/content/blog/cap-v03-launch.mdx
similarity index 94%
rename from apps/web/content/updates/cap-v03-launch.mdx
rename to apps/web/content/blog/cap-v03-launch.mdx
index 0b258a5d0..9f1fd8cc4 100644
--- a/apps/web/content/updates/cap-v03-launch.mdx
+++ b/apps/web/content/blog/cap-v03-launch.mdx
@@ -3,7 +3,7 @@ title: Cap v0.3.0 - A New Direction
description: 4 months ago I announced Cap's public beta launch, and today I'm excited to announce Cap v0.3.0. A brand new, reimagined version of Cap.
publishedAt: "2024-09-28"
category: Release
-image: /updates/cap-v3-announce.jpg
+image: /blog/cap-v3-announce.jpg
author: Richie McIlroy
tags: News, Updates, Release
---
@@ -14,7 +14,7 @@ It's been four months since we launched Cap's public beta, and I'm excited to an
## What's New in v0.3.0?
-We've rebuilt the entire app from the ground up, focusing on
+We've rebuilt the entire app from the ground up, focusing on
what matters most: making screen recording and sharing as effortless and powerful as possible.
### 1. Video Editing
@@ -33,7 +33,7 @@ We've refined the Cap interface to make it even more user-friendly. The new desi
Sharing your recordings is now even easier. Once you're happy with your video, you can get a shareable link with just one click.
-### 5. Screenshots
+### 5. Screenshots
We've added a new feature that allows you to take screenshots of your desktop. Just like sharing screen recordings, you can easily share your screenshots with a single click.
@@ -63,4 +63,4 @@ As always, feel free to reach out with any thoughts or feedback. My inbox is alw
Cheers,
-Richie McIlroy — Founder of Cap
\ No newline at end of file
+Richie McIlroy — Founder of Cap
diff --git a/apps/web/content/blog/handling-a-stripe-payment-attack.mdx b/apps/web/content/blog/handling-a-stripe-payment-attack.mdx
new file mode 100644
index 000000000..2ccba9de2
--- /dev/null
+++ b/apps/web/content/blog/handling-a-stripe-payment-attack.mdx
@@ -0,0 +1,112 @@
+---
+title: Facing a Stripe Payment Attack During Our Product Hunt Launch
+description: How we handled an unexpected Stripe payment attack during Cap's Product Hunt launch, and what we learnt from it.
+publishedAt: "2024-11-29"
+category: Technical
+image: /blog/stripe-payment-attack.jpg
+author: Richie McIlroy
+tags: Security, Stripe, Product Launch, Payment Attack
+---
+
+A couple of days ago, we launched Cap on Product Hunt, confident we were prepared for anything.
+
+Everything would go perfectly, right?
+
+Not quite. Let me share what happened and the mistakes we made along the way.
+
+## The Unexpected Surprise
+
+In the midst of the launch frenzy, I glanced at our Stripe dashboard. At first, I thought, "Wow, that's a lot of new subscriptions!". Transactions were pouring in—hundreds within minutes. But my excitement quickly turned to concern.
+
+Upon closer inspection, I realised that thousands of dollars in fraudulent transactions had been blocked in just a few minutes, all originating from the same country. We were under a coordinated payment attack.
+
+I couldn't believe it.
+
+## Why Payment Attacks Are a Big Deal
+
+Payment attacks are more than just a nuisance—they can have serious implications:
+
+- **Financial Risks:** Even if fraudulent transactions are blocked, they can still incur fees. If any slip through, you're on the hook for chargebacks, which can cost up to £15 per dispute.
+- **Account Standing:** High volumes of fraudulent activity can flag your account as high-risk. Payment processors might impose holds, reserve funds, or even terminate your account.
+- **Operational Disruption:** Dealing with an attack diverts time and resources from your core activities—in our case, interacting with our new users during the launch.
+- **Reputation Damage:** Customers may question the security of your platform, affecting trust and long-term loyalty.
+
+According to [research by Juniper Research](https://www.juniperresearch.com/press/online-payment-fraud-losses-to-exceed-343bn), payment fraud losses are expected to exceed £343 billion globally between 2023-2027. It's a widespread issue that can hit anyone, with fraudsters becoming increasingly sophisticated in their attack methods.
+
+## Scrambling for a Solution
+
+With our focus already split, we needed to act fast. Here's what we did:
+
+### 1. Blocked Transactions from Specific Countries
+
+I noticed all the fraudulent attempts were coming from a single country (PK). Using Stripe's Radar rules, I set up a temporary rule to block transactions originating from that country. This immediately reduced the number of incoming fraudulent attempts.
+
+### 2. Tightened Stripe Radar Settings
+
+We lowered the risk threshold in [Stripe Radar](https://stripe.com/radar) from 75% to 50%. This made our fraud detection more sensitive, catching more suspicious transactions before they could proceed.
+
+### 3. Implemented Advanced Fraud Detection with Stripe Radar
+
+We dove deeper into Stripe Radar's advanced features:
+
+- **Custom Radar Rules:** We wrote custom rules to block payments with high-risk signals, such as mismatched billing countries or known fraudulent BINs.
+- **3D Secure Enforcement:** We enabled mandatory 3D Secure authentication for all high-risk transactions. This adds an extra layer of verification, significantly reducing fraud.
+- **Real-Time Fraud Insights:** We set up real-time alerts for fraudulent activity. This way, we could respond immediately to any suspicious transactions.
+
+### 4. Added a Vercel Firewall Challenge
+
+To further enhance our security measures, we [Vercel Firewall's](https://vercel.com/docs/security/vercel-firewall) challenge system into our stack. This powerful tool helps verify legitimate users through an intelligent, customisable challenge mechanism, providing an additional layer of protection for our platform.
+
+## Reaching Out for Help
+
+After posting about our situation [on X](https://x.com/richiemcilroy/status/1862337093046788599), I was amazed by how many founders reached out sharing their own payment attack stories. It seems this is a more common issue than we thought, especially during high-visibility events like launches.
+
+### Community Suggestions
+
+- **Implement Captchas:** Several people suggested adding captchas to our payment forms to deter bots.
+- **Monitor Early Fraud Warnings:** Setting up webhooks for early fraud warnings helps act quickly.
+- **Refund Suspicious Payments Immediately:** By promptly refunding questionable transactions, you can avoid dispute fees and maintain your account health.
+- **Contact Stripe Support for Custom Solutions:** Some suggested reaching out to Stripe to implement measures like blocking payments after a certain number of failed attempts.
+
+## Reflecting on the Chaos
+
+Looking back, we realised that even with strong security measures in place, unexpected attacks can still occur. The key is how quickly and effectively you respond.
+
+### What We Learnt
+
+- **Stay Vigilant During High-Profile Events**
+ Launches can attract unwanted attention. We monitored our systems closely but learnt that real-time adjustments are crucial.
+
+- **Leverage All Available Security Tools**
+ Platforms like Stripe offer robust features—make sure you're utilising them fully. The advanced settings in Stripe Radar were instrumental in mitigating the attack.
+
+- **Community Support Is Invaluable**
+ The advice and support we received helped us act swiftly and effectively.
+
+- **Security Is an Ongoing Process**
+ Threats evolve, and so should your defences. Regularly review and update your security protocols.
+
+## Moving Forward
+
+We're taking additional steps to bolster our defences:
+
+- **Enforcing 3D Secure and Mandatory CVC Checks**
+ Strengthening authentication for all transactions to prevent unauthorised use.
+- **Integrating Captchas**
+ Adding captchas to our payment process to deter bots and automated attacks.
+- **Regular Security Audits**
+ Scheduling periodic reviews of our security settings to stay ahead of potential threats.
+- **Advanced Monitoring with Stripe Radar**
+ Continuously refining our Radar rules and utilising machine learning insights to detect and prevent fraud.
+
+## Closing Thoughts
+
+Last night was a wake-up call. It wasn't how we planned to spend our launch night, but it taught us valuable lessons.
+
+To everyone who offered advice and support—thank you. Your insights made a tough situation manageable.
+
+If you're running a business or planning a launch, take our experience as a reminder: even when you think you're prepared, there's always more you can do to protect yourself and your customers.
+
+Cheers,
+
+Richie McIlroy — Founder of Cap
diff --git a/apps/web/content/guides/cap-public-beta-launch.mdx b/apps/web/content/guides/cap-public-beta-launch.mdx
index fd80957c1..5a5694440 100644
--- a/apps/web/content/guides/cap-public-beta-launch.mdx
+++ b/apps/web/content/guides/cap-public-beta-launch.mdx
@@ -3,7 +3,7 @@ title: Cap Public Beta Release
description: After 6 long months of development, Cap has officially launched in public beta.
publishedAt: "2024-04-25"
category: Release
-image: /updates/cap-beta-release.jpg
+image: /blog/cap-beta-release.jpg
author: Richie McIlroy
tags: News, Updates, Release
---
@@ -26,13 +26,13 @@ With either the browser or macOS app, you select your recording options (webcam,
You can access the Cap browser app on any desktop computer (Windows, Linux, macOS). This is the easiest way to get started with Cap, and requires no download. You can record your entire screen or just a specific window or tab, with your webcam overlayed. It's also very easy to resize and change the position of it in your recording.
-![Cap Web App Screenshot](/updates/cap-web-app.png)
+![Cap Web App Screenshot](/blog/cap-web-app.png)
## Cap macOS App
It's still very early days for the macOS app, but after a bunch of testing, the app is now stable enough to reliably take screen recordings of your desktop. Right now you can only record the entire screen, but more options are coming soon, as well as Windows and Linux releases. If you'd like to contribute to the Windows release, we are always looking for more [contributors](https://github.com/CapSoftware/Cap).
-![enter image description here](/updates/cap-emoji-banner.png)
+![enter image description here](/blog/cap-emoji-banner.png)
## Upcoming Features
diff --git a/apps/web/content/guides/cap-v03-launch.mdx b/apps/web/content/guides/cap-v03-launch.mdx
index 0b258a5d0..9f1fd8cc4 100644
--- a/apps/web/content/guides/cap-v03-launch.mdx
+++ b/apps/web/content/guides/cap-v03-launch.mdx
@@ -3,7 +3,7 @@ title: Cap v0.3.0 - A New Direction
description: 4 months ago I announced Cap's public beta launch, and today I'm excited to announce Cap v0.3.0. A brand new, reimagined version of Cap.
publishedAt: "2024-09-28"
category: Release
-image: /updates/cap-v3-announce.jpg
+image: /blog/cap-v3-announce.jpg
author: Richie McIlroy
tags: News, Updates, Release
---
@@ -14,7 +14,7 @@ It's been four months since we launched Cap's public beta, and I'm excited to an
## What's New in v0.3.0?
-We've rebuilt the entire app from the ground up, focusing on
+We've rebuilt the entire app from the ground up, focusing on
what matters most: making screen recording and sharing as effortless and powerful as possible.
### 1. Video Editing
@@ -33,7 +33,7 @@ We've refined the Cap interface to make it even more user-friendly. The new desi
Sharing your recordings is now even easier. Once you're happy with your video, you can get a shareable link with just one click.
-### 5. Screenshots
+### 5. Screenshots
We've added a new feature that allows you to take screenshots of your desktop. Just like sharing screen recordings, you can easily share your screenshots with a single click.
@@ -63,4 +63,4 @@ As always, feel free to reach out with any thoughts or feedback. My inbox is alw
Cheers,
-Richie McIlroy — Founder of Cap
\ No newline at end of file
+Richie McIlroy — Founder of Cap
diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs
index 4c2c888c4..2dde732b2 100644
--- a/apps/web/next.config.mjs
+++ b/apps/web/next.config.mjs
@@ -60,6 +60,16 @@ const nextConfig = {
"https://capso.notion.site/7aac740edeee49b5a23be901a7cb734e?v=9d4a3bf3d72d488cad9b899ab73116a1",
permanent: true,
},
+ {
+ source: "/updates",
+ destination: "/blog",
+ permanent: true,
+ },
+ {
+ source: "/updates/:slug",
+ destination: "/blog/:slug",
+ permanent: true,
+ },
];
},
env: {
diff --git a/apps/web/package.json b/apps/web/package.json
index 14a42e919..4a10d1f11 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -1,6 +1,6 @@
{
"name": "web",
- "version": "0.3.0",
+ "version": "0.3.1",
"private": true,
"scripts": {
"dev": "dotenv -e ../../.env -- next dev",
diff --git a/apps/web/public/updates/Wrapper.png b/apps/web/public/blog/Wrapper.png
similarity index 100%
rename from apps/web/public/updates/Wrapper.png
rename to apps/web/public/blog/Wrapper.png
diff --git a/apps/web/public/updates/cap-beta-release.jpg b/apps/web/public/blog/cap-beta-release.jpg
similarity index 100%
rename from apps/web/public/updates/cap-beta-release.jpg
rename to apps/web/public/blog/cap-beta-release.jpg
diff --git a/apps/web/public/updates/cap-emoji-banner.png b/apps/web/public/blog/cap-emoji-banner.png
similarity index 100%
rename from apps/web/public/updates/cap-emoji-banner.png
rename to apps/web/public/blog/cap-emoji-banner.png
diff --git a/apps/web/public/updates/cap-v3-announce.jpg b/apps/web/public/blog/cap-v3-announce.jpg
similarity index 100%
rename from apps/web/public/updates/cap-v3-announce.jpg
rename to apps/web/public/blog/cap-v3-announce.jpg
diff --git a/apps/web/public/updates/cap-web-app.png b/apps/web/public/blog/cap-web-app.png
similarity index 100%
rename from apps/web/public/updates/cap-web-app.png
rename to apps/web/public/blog/cap-web-app.png
diff --git a/apps/web/public/updates/og.png b/apps/web/public/blog/og.png
similarity index 100%
rename from apps/web/public/updates/og.png
rename to apps/web/public/blog/og.png
diff --git a/apps/web/public/blog/stripe-payment-attack.jpg b/apps/web/public/blog/stripe-payment-attack.jpg
new file mode 100644
index 000000000..45160ae89
Binary files /dev/null and b/apps/web/public/blog/stripe-payment-attack.jpg differ
diff --git a/apps/web/utils/updates.ts b/apps/web/utils/blog.ts
similarity index 96%
rename from apps/web/utils/updates.ts
rename to apps/web/utils/blog.ts
index 87ece9cb6..de472da3b 100644
--- a/apps/web/utils/updates.ts
+++ b/apps/web/utils/blog.ts
@@ -58,7 +58,7 @@ function getMDXData(dir: string) {
}
export function getBlogPosts() {
- return getMDXData(path.join(process.cwd(), "content/updates"));
+ return getMDXData(path.join(process.cwd(), "content/blog"));
}
export function getDocs() {
diff --git a/apps/web/utils/readTime.ts b/apps/web/utils/readTime.ts
new file mode 100644
index 000000000..2ffa2d270
--- /dev/null
+++ b/apps/web/utils/readTime.ts
@@ -0,0 +1,7 @@
+const WORDS_PER_MINUTE = 200;
+
+export function calculateReadingTime(content: string): number {
+ const words = content.trim().split(/\s+/).length;
+ const time = Math.ceil(words / WORDS_PER_MINUTE);
+ return Math.max(1, time);
+}
\ No newline at end of file