Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Added some more Help Center content, added inline blurimage

Steven Teya23101533e58
diff --git a/app/dub.sh/changelog/[slug]/page.tsx b/app/dub.sh/changelog/[slug]/page.tsx
index 7db895b98d..9df04dea78 100644
--- a/app/dub.sh/changelog/[slug]/page.tsx
+++ b/app/dub.sh/changelog/[slug]/page.tsx
@@ -104,7 +104,7 @@ export default async function ChangelogPost({
height={900}
priority // since it's above the fold
placeholder="blur"
- blurDataURL={await getBlurDataURL(post.image!)}
+ blurDataURL={await getBlurDataURL(post.image)}
className="border border-gray-100 md:rounded-2xl"
/>
<div className="mx-5 mb-10 flex items-center justify-between md:mx-0">
diff --git a/app/dub.sh/help/article/[slug]/page.tsx b/app/dub.sh/help/article/[slug]/page.tsx
index 6463fc6e45..a8a9fecbe7 100644
--- a/app/dub.sh/help/article/[slug]/page.tsx
+++ b/app/dub.sh/help/article/[slug]/page.tsx
@@ -9,8 +9,10 @@ import Author from "#/ui/content/author";
import { MDX } from "#/ui/content/mdx";
import TableOfContents from "#/ui/content/table-of-contents";
import Feedback from "#/ui/content/feedback";
+import ArticleLink from "#/ui/content/article-link";
+import { getBlurDataURL } from "#/lib/images";
-export default function HelpArticle({
+export default async function HelpArticle({
params,
}: {
params: {
@@ -22,9 +24,25 @@ export default function HelpArticle({
notFound();
}
const category = CATEGORIES.find(
- (category) => category.slug === data.category,
+ (category) => data.categories[0] === category.slug,
)!;
+ const [images] = await Promise.all([
+ await Promise.all(
+ data.images.map(async (src: string) => ({
+ src,
+ blurDataURL: await getBlurDataURL(src),
+ })),
+ ),
+ ]);
+
+ const relatedArticles =
+ (data.related &&
+ data.related.map(
+ (slug) => allHelpPosts.find((post) => post.slug === slug)!,
+ )) ||
+ [];
+
return (
<>
<MaxWidthWrapper className="max-w-screen-lg">
@@ -35,7 +53,7 @@ export default function HelpArticle({
<div className="border border-gray-200 bg-white/50 shadow-[inset_10px_-50px_94px_0_rgb(199,199,199,0.2)] backdrop-blur-lg">
<MaxWidthWrapper className="grid max-w-screen-lg grid-cols-4 gap-10 py-10">
- <div className="col-span-4 sm:col-span-3 sm:pr-10">
+ <div className="col-span-4 flex flex-col space-y-8 sm:col-span-3 sm:pr-10">
<div className="flex flex-wrap items-center space-x-2">
<Link
href="/help"
@@ -58,7 +76,7 @@ export default function HelpArticle({
{data.title}
</Link>
</div>
- <div className="my-8 flex flex-col space-y-4">
+ <div className="flex flex-col space-y-4">
<Link href={`/help/article/${data.slug}`}>
<h1 className="font-display text-2xl font-bold sm:text-4xl">
{data.title}
@@ -67,7 +85,19 @@ export default function HelpArticle({
<p className="text-gray-500">{data.summary}</p>
<Author username={data.author} updatedAt={data.updatedAt} />
</div>
- <MDX code={data.body.code} />
+ <MDX code={data.body.code} images={images} />
+ {relatedArticles.length > 0 && (
+ <div className="flex flex-col space-y-4 border-t border-gray-200 pt-8">
+ <h2 className="font-display text-xl font-bold sm:text-2xl">
+ Related Articles
+ </h2>
+ <div className="grid gap-2 rounded-xl border border-gray-200 bg-white p-4">
+ {relatedArticles.map((article) => (
+ <ArticleLink key={article.slug} article={article} />
+ ))}
+ </div>
+ </div>
+ )}
<Feedback />
</div>
<TableOfContents items={data.tableOfContents} />
diff --git a/app/dub.sh/help/category/[slug]/page.tsx b/app/dub.sh/help/category/[slug]/page.tsx
index 29a78357bc..53bc71d301 100644
--- a/app/dub.sh/help/category/[slug]/page.tsx
+++ b/app/dub.sh/help/category/[slug]/page.tsx
@@ -1,13 +1,13 @@
import { notFound } from "next/navigation";
import { allHelpPosts } from "contentlayer/generated";
-import { CATEGORIES } from "#/lib/constants/content";
+import { POPULAR_ARTICLES, CATEGORIES } from "#/lib/constants/content";
import MaxWidthWrapper from "@/components/shared/max-width-wrapper";
import SearchButton from "#/ui/content/search-button";
import Link from "next/link";
import { ChevronRight } from "lucide-react";
import ArticleLink from "#/ui/content/article-link";
-export default function HelpArticle({
+export default function HelpCategory({
params,
}: {
params: {
@@ -18,7 +18,17 @@ export default function HelpArticle({
if (!data) {
notFound();
}
- const articles = allHelpPosts.filter((post) => post.category === data.slug);
+ const articles = allHelpPosts
+ .filter((post) => post.categories.includes(data.slug))
+ // order by POPULAR_ARTICLES
+ .reduce((acc, curr) => {
+ if (POPULAR_ARTICLES.includes(curr.slug)) {
+ acc.unshift(curr);
+ } else {
+ acc.push(curr);
+ }
+ return acc;
+ }, [] as typeof allHelpPosts);
return (
<>
@@ -53,7 +63,7 @@ export default function HelpArticle({
</Link>
<p className="text-gray-500">{data.description}</p>
</div>
- <div className="rounded-xl border border-gray-200 bg-white px-4 py-6">
+ <div className="grid gap-2 rounded-xl border border-gray-200 bg-white p-4">
{articles.map((article) => (
<ArticleLink key={article.slug} article={article} />
))}
diff --git a/app/dub.sh/help/page.tsx b/app/dub.sh/help/page.tsx
index f22253f232..53f42142a5 100644
--- a/app/dub.sh/help/page.tsx
+++ b/app/dub.sh/help/page.tsx
@@ -1,8 +1,6 @@
import { constructMetadata } from "#/lib/utils";
-import { ExpandingArrow } from "#/ui/icons";
import MaxWidthWrapper from "@/components/shared/max-width-wrapper";
import { allHelpPosts } from "contentlayer/generated";
-import Link from "next/link";
import { CATEGORIES, POPULAR_ARTICLES } from "#/lib/constants/content";
import SearchButton from "#/ui/content/search-button";
import CategoryCard from "#/ui/content/category-card";
@@ -19,8 +17,9 @@ export default function HelpCenter() {
const categories = CATEGORIES.map((category) => ({
...category,
- postCount: allHelpPosts.filter((post) => post.category === category.slug)
- .length,
+ postCount: allHelpPosts.filter((post) =>
+ post.categories.includes(category.slug),
+ ).length,
}));
return (
diff --git a/app/ui/cmdk.tsx b/app/ui/cmdk.tsx
index c85c0ea5e7..79139587c2 100644
--- a/app/ui/cmdk.tsx
+++ b/app/ui/cmdk.tsx
@@ -25,12 +25,12 @@ function CMDKHelper({
setShowCMDK: Dispatch<SetStateAction<boolean>>;
}) {
return (
- <Modal showModal={showCMDK} setShowModal={setShowCMDK}>
- <Command
- label="CMDK"
- className="w-full overflow-hidden bg-white shadow-xl sm:max-w-xl sm:rounded-xl sm:border sm:border-gray-200"
- loop
- >
+ <Modal
+ showModal={showCMDK}
+ setShowModal={setShowCMDK}
+ className="sm:max-w-xl"
+ >
+ <Command label="CMDK" loop>
<Command.Input
autoFocus
placeholder="Search articles, guides, and more..."
diff --git a/app/ui/content/article-link.tsx b/app/ui/content/article-link.tsx
index 0a5c32e9b5..fc2548ca80 100644
--- a/app/ui/content/article-link.tsx
+++ b/app/ui/content/article-link.tsx
@@ -6,7 +6,7 @@ export default function ArticleLink({ article }: { article: HelpPost }) {
return (
<Link
href={`/help/article/${article.slug}`}
- className="group flex items-center justify-between rounded-lg px-2 py-2.5 transition-colors hover:bg-purple-100 active:bg-purple-200 sm:px-4"
+ className="group flex items-center justify-between rounded-lg px-2 py-3 transition-colors hover:bg-purple-100 active:bg-purple-200 sm:px-4"
>
<h3 className="text-sm font-medium text-gray-600 group-hover:text-purple-600 sm:text-base">
{article.title}
diff --git a/app/ui/content/feedback.tsx b/app/ui/content/feedback.tsx
index afd5765217..d025c57d6d 100644
--- a/app/ui/content/feedback.tsx
+++ b/app/ui/content/feedback.tsx
@@ -32,7 +32,7 @@ export default function Feedback() {
}, [slug, reaction]);
return (
- <div className="my-10 flex flex-col items-center justify-center space-y-2 rounded-lg border border-y-gray-200 bg-white py-10">
+ <div className="mb-10 flex flex-col items-center justify-center space-y-2 border-t border-gray-200 py-10">
<p className="text-gray-500 sm:text-lg">Did this answer your question?</p>
<div className="flex space-x-4">
{reactions.map(({ emoji, label }) => (
diff --git a/app/ui/content/mdx.tsx b/app/ui/content/mdx.tsx
index 03d9e1d7a0..778b999151 100644
--- a/app/ui/content/mdx.tsx
+++ b/app/ui/content/mdx.tsx
@@ -26,12 +26,25 @@ const CustomLink = (props: any) => {
};
const components = {
- a: CustomLink,
+ h2: (props: any) => <h2 className="text-2xl" {...props} />,
+ a: (props: any) => (
+ <CustomLink
+ className="font-medium text-gray-500 underline-offset-4 hover:text-black"
+ {...props}
+ />
+ ),
+ code: (props: any) => (
+ <code
+ className="rounded-md bg-gray-200 px-2 py-1 font-medium text-rose-500 before:hidden after:hidden"
+ {...props}
+ />
+ ),
+ thead: (props: any) => <thead className="text-lg" {...props} />,
};
interface MDXProps {
code: string;
- images?: { url: string; blurDataURL: string }[];
+ images?: { alt: string; src: string; blurDataURL: string }[];
tweets?: any[];
repos?: GithubRepoProps[];
}
@@ -42,19 +55,23 @@ export function MDX({ code, images, tweets, repos }: MDXProps) {
const MDXImage = (props: any) => {
if (!images) return null;
const blurDataURL = images.find(
- (image) => image.url === props.src,
+ (image) => image.src === props.src,
)?.blurDataURL;
return (
- <BlurImage
- {...props}
- alt={props.alt || "Image"}
- placeholder="blur"
- blurDataURL={
- blurDataURL ||
- "data:image/webp;base64,AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
- }
- />
+ <div className="not-prose flex flex-col items-center justify-center space-y-3">
+ <BlurImage
+ {...props}
+ onClick={() => window.open(props.src, "_blank")}
+ className="cursor-zoom-in rounded-lg border border-gray-200"
+ placeholder="blur"
+ blurDataURL={
+ blurDataURL ||
+ "data:image/webp;base64,AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
+ }
+ />
+ <p className="text-sm italic text-gray-500">{props.alt}</p>
+ </div>
);
};
@@ -73,14 +90,11 @@ export function MDX({ code, images, tweets, repos }: MDXProps) {
return (
<article
data-mdx-container
- className={`
- prose prose-gray w-full transition-all prose-headings:relative prose-headings:scroll-mt-20 prose-headings:font-display prose-headings:font-bold
- prose-h2:text-2xl prose-a:font-medium
- prose-a:text-gray-500 prose-a:underline-offset-4 hover:prose-a:text-black prose-code:rounded-md
- prose-code:bg-gray-200 prose-code:px-2 prose-code:py-1 prose-code:font-medium prose-code:text-rose-500 prose-code:before:hidden prose-code:after:hidden prose-thead:text-lg
- `}
+ className="prose prose-gray w-full transition-all prose-headings:relative prose-headings:scroll-mt-20 prose-headings:font-display prose-headings:font-bold"
>
- <Component components={{ ...components, MDXImage, MDXTweet, MDXRepo }} />
+ <Component
+ components={{ ...components, Image: MDXImage, MDXTweet, MDXRepo }}
+ />
</article>
);
}
diff --git a/app/ui/modals/add-edit-link-modal/android-section.tsx b/app/ui/modals/add-edit-link-modal/android-section.tsx
index 2fc050faae..ade4ac699f 100644
--- a/app/ui/modals/add-edit-link-modal/android-section.tsx
+++ b/app/ui/modals/add-edit-link-modal/android-section.tsx
@@ -3,8 +3,7 @@ import { LinkProps } from "#/lib/types";
import Switch from "#/ui/switch";
import { motion } from "framer-motion";
import { FADE_IN_ANIMATION_SETTINGS } from "#/lib/constants";
-import Tooltip from "#/ui/tooltip";
-import { HelpCircle } from "lucide-react";
+import { InfoTooltip } from "#/ui/tooltip";
export default function AndroidSection({
props,
@@ -37,9 +36,7 @@ export default function AndroidSection({
<h2 className="text-sm font-medium text-gray-900">
Android Targeting
</h2>
- <Tooltip content="Redirect your Android users to a different link (e.g. Google Play Store link for your app).">
- <HelpCircle className="h-4 w-4 text-gray-600" />
- </Tooltip>
+ <InfoTooltip content="Redirect your Android users to a different link (e.g. Google Play Store link for your app)." />
</div>
<Switch fn={() => setEnabled(!enabled)} checked={enabled} />
</div>
diff --git a/app/ui/modals/add-edit-link-modal/expiration-section.tsx b/app/ui/modals/add-edit-link-modal/expiration-section.tsx
index fc9582deef..1905b75617 100644
--- a/app/ui/modals/add-edit-link-modal/expiration-section.tsx
+++ b/app/ui/modals/add-edit-link-modal/expiration-section.tsx
@@ -3,8 +3,7 @@ import { LinkProps } from "#/lib/types";
import { getDateTimeLocal } from "#/lib/utils";
import Switch from "#/ui/switch";
import { motion } from "framer-motion";
-import Tooltip from "#/ui/tooltip";
-import { HelpCircle } from "lucide-react";
+import { InfoTooltip } from "#/ui/tooltip";
export default function ExpirationSection({
props,
@@ -35,9 +34,7 @@ export default function ExpirationSection({
<div className="flex items-center justify-between">
<div className="flex items-center justify-between space-x-2">
<h2 className="text-sm font-medium text-gray-900">Expiration Date</h2>
- <Tooltip content="By setting an expiration date, your link will only be accessible until the specified date.">
- <HelpCircle className="h-4 w-4 text-gray-600" />
- </Tooltip>
+ <InfoTooltip content="By setting an expiration date, your link will only be accessible until the specified date." />
</div>
<Switch fn={() => setEnabled(!enabled)} checked={enabled} />
</div>
diff --git a/app/ui/modals/add-edit-link-modal/ios-section.tsx b/app/ui/modals/add-edit-link-modal/ios-section.tsx
index 4acf93bd70..68d0826154 100644
--- a/app/ui/modals/add-edit-link-modal/ios-section.tsx
+++ b/app/ui/modals/add-edit-link-modal/ios-section.tsx
@@ -3,8 +3,7 @@ import { LinkProps } from "#/lib/types";
import Switch from "#/ui/switch";
import { motion } from "framer-motion";
import { FADE_IN_ANIMATION_SETTINGS } from "#/lib/constants";
-import Tooltip from "#/ui/tooltip";
-import { HelpCircle } from "lucide-react";
+import { InfoTooltip } from "#/ui/tooltip";
export default function IOSSection({
props,
@@ -35,9 +34,7 @@ export default function IOSSection({
<div className="flex items-center justify-between">
<div className="flex items-center justify-between space-x-2">
<h2 className="text-sm font-medium text-gray-900">iOS Targeting</h2>
- <Tooltip content="Redirect your iOS users to a different link (e.g. App Store link for your app).">
- <HelpCircle className="h-4 w-4 text-gray-600" />
- </Tooltip>
+ <InfoTooltip content="Redirect your iOS users to a different link (e.g. App Store link for your app)." />
</div>
<Switch fn={() => setEnabled(!enabled)} checked={enabled} />
</div>
diff --git a/app/ui/modals/add-edit-link-modal/og-section.tsx b/app/ui/modals/add-edit-link-modal/og-section.tsx
index 6cd4df67c2..e119213776 100644
--- a/app/ui/modals/add-edit-link-modal/og-section.tsx
+++ b/app/ui/modals/add-edit-link-modal/og-section.tsx
@@ -12,8 +12,7 @@ import { LoadingCircle } from "#/ui/icons";
import { LinkProps } from "#/lib/types";
import Switch from "#/ui/switch";
import { FADE_IN_ANIMATION_SETTINGS } from "#/lib/constants";
-import Tooltip from "#/ui/tooltip";
-import { HelpCircle } from "lucide-react";
+import { InfoTooltip } from "#/ui/tooltip";
export default function OGSection({
props,
@@ -73,9 +72,7 @@ export default function OGSection({
<h2 className="text-sm font-medium text-gray-900">
Custom Social Media Cards
</h2>
- <Tooltip content="Customize the title, description, and thumbnail image that will be shown when you share this link on social media.">
- <HelpCircle className="h-4 w-4 text-gray-600" />
- </Tooltip>
+ <InfoTooltip content="Customize the title, description, and thumbnail image that will be shown when you share this link on social media." />
</div>
<Switch
fn={() => setData((prev) => ({ ...prev, proxy: !proxy }))}
diff --git a/app/ui/modals/add-edit-link-modal/password-section.tsx b/app/ui/modals/add-edit-link-modal/password-section.tsx
index e2debf362e..0d8bb3ca24 100644
--- a/app/ui/modals/add-edit-link-modal/password-section.tsx
+++ b/app/ui/modals/add-edit-link-modal/password-section.tsx
@@ -4,8 +4,7 @@ import Switch from "#/ui/switch";
import { motion } from "framer-motion";
import { FADE_IN_ANIMATION_SETTINGS } from "#/lib/constants";
import { Eye, EyeOff } from "@/components/shared/icons";
-import Tooltip from "#/ui/tooltip";
-import { HelpCircle } from "lucide-react";
+import { InfoTooltip } from "#/ui/tooltip";
export default function PasswordSection({
props,
@@ -40,9 +39,7 @@ export default function PasswordSection({
<h2 className="text-sm font-medium text-gray-900">
Password Protection
</h2>
- <Tooltip content="Password protection allows you to restrict access to your link by encrypting it with a password. Only those who know the password will be able to access your link.">
- <HelpCircle className="h-4 w-4 text-gray-600" />
- </Tooltip>
+ <InfoTooltip content="Password protection allows you to restrict access to your link by encrypting it with a password. Only those who know the password will be able to access your link." />
</div>
<Switch fn={() => setEnabled(!enabled)} checked={enabled} />
</div>
diff --git a/app/ui/modals/add-edit-link-modal/utm-section.tsx b/app/ui/modals/add-edit-link-modal/utm-section.tsx
index 581c37cde1..105253b6ed 100644
--- a/app/ui/modals/add-edit-link-modal/utm-section.tsx
+++ b/app/ui/modals/add-edit-link-modal/utm-section.tsx
@@ -9,8 +9,7 @@ import {
} from "#/lib/utils";
import Switch from "#/ui/switch";
import { FADE_IN_ANIMATION_SETTINGS } from "#/lib/constants";
-import Tooltip from "#/ui/tooltip";
-import { HelpCircle } from "lucide-react";
+import { InfoTooltip } from "#/ui/tooltip";
export default function UTMSection({
props,
@@ -61,9 +60,7 @@ export default function UTMSection({
<div className="flex items-center justify-between">
<div className="flex items-center justify-between space-x-2">
<h2 className="text-sm font-medium text-gray-900">UTM Builder</h2>
- <Tooltip content="UTM parameters are tags that will be added to the end of the destination URL. When your link is clicked, the tags are detected and tracked by your analytics software.">
- <HelpCircle className="h-4 w-4 text-gray-600" />
- </Tooltip>
+ <InfoTooltip content="UTM parameters are tags that will be added to the end of the destination URL. When your link is clicked, the tags are detected and tracked by your analytics software." />
</div>
<Switch fn={() => setEnabled(!enabled)} checked={enabled} />
</div>
diff --git a/app/ui/tooltip.tsx b/app/ui/tooltip.tsx
index a449067b49..f4481d7a6a 100644
--- a/app/ui/tooltip.tsx
+++ b/app/ui/tooltip.tsx
@@ -10,7 +10,7 @@ import { AnimatePresence, motion, useAnimation } from "framer-motion";
import BlurImage from "#/ui/blur-image";
import Button from "./button";
import Script from "next/script";
-import { ExternalLink, Globe, GlobeIcon } from "lucide-react";
+import { ExternalLink, Globe, GlobeIcon, HelpCircle } from "lucide-react";
import { DomainProps } from "#/lib/types";
import { CheckCircleFill, XCircleFill } from "@/components/shared/icons";
@@ -165,6 +165,14 @@ export function TooltipContent({
);
}
+export function InfoTooltip({ content }: { content: string }) {
+ return (
+ <Tooltip content={content}>
+ <HelpCircle className="h-4 w-4 text-gray-500" />
+ </Tooltip>
+ );
+}
+
export function SSOWaitlist() {
const [opening, setOpening] = useState(false);
return (
diff --git a/components/app/modals/add-edit-link-modal/android-section.tsx b/components/app/modals/add-edit-link-modal/android-section.tsx
index 2fc050faae..ade4ac699f 100644
--- a/components/app/modals/add-edit-link-modal/android-section.tsx
+++ b/components/app/modals/add-edit-link-modal/android-section.tsx
@@ -3,8 +3,7 @@ import { LinkProps } from "#/lib/types";
import Switch from "#/ui/switch";
import { motion } from "framer-motion";
import { FADE_IN_ANIMATION_SETTINGS } from "#/lib/constants";
-import Tooltip from "#/ui/tooltip";
-import { HelpCircle } from "lucide-react";
+import { InfoTooltip } from "#/ui/tooltip";
export default function AndroidSection({
props,
@@ -37,9 +36,7 @@ export default function AndroidSection({
<h2 className="text-sm font-medium text-gray-900">
Android Targeting
</h2>
- <Tooltip content="Redirect your Android users to a different link (e.g. Google Play Store link for your app).">
- <HelpCircle className="h-4 w-4 text-gray-600" />
- </Tooltip>
+ <InfoTooltip content="Redirect your Android users to a different link (e.g. Google Play Store link for your app)." />
</div>
<Switch fn={() => setEnabled(!enabled)} checked={enabled} />
</div>
diff --git a/components/app/modals/add-edit-link-modal/expiration-section.tsx b/components/app/modals/add-edit-link-modal/expiration-section.tsx
index e665f5d7a3..2a4f1ef594 100644
--- a/components/app/modals/add-edit-link-modal/expiration-section.tsx
+++ b/components/app/modals/add-edit-link-modal/expiration-section.tsx
@@ -4,8 +4,7 @@ import { getDateTimeLocal } from "#/lib/utils";
import Switch from "#/ui/switch";
import { motion } from "framer-motion";
import { FADE_IN_ANIMATION_SETTINGS } from "#/lib/constants";
-import Tooltip from "#/ui/tooltip";
-import { HelpCircle } from "lucide-react";
+import { InfoTooltip } from "#/ui/tooltip";
export default function ExpirationSection({
props,
@@ -36,9 +35,7 @@ export default function ExpirationSection({
<div className="flex items-center justify-between">
<div className="flex items-center justify-between space-x-2">
<h2 className="text-sm font-medium text-gray-900">Expiration Date</h2>
- <Tooltip content="By setting an expiration date, your link will only be accessible until the specified date.">
- <HelpCircle className="h-4 w-4 text-gray-600" />
- </Tooltip>
+ <InfoTooltip content="By setting an expiration date, your link will only be accessible until the specified date." />
</div>
<Switch fn={() => setEnabled(!enabled)} checked={enabled} />
</div>
diff --git a/components/app/modals/add-edit-link-modal/ios-section.tsx b/components/app/modals/add-edit-link-modal/ios-section.tsx
index 4acf93bd70..68d0826154 100644
--- a/components/app/modals/add-edit-link-modal/ios-section.tsx
+++ b/components/app/modals/add-edit-link-modal/ios-section.tsx
@@ -3,8 +3,7 @@ import { LinkProps } from "#/lib/types";
import Switch from "#/ui/switch";
import { motion } from "framer-motion";
import { FADE_IN_ANIMATION_SETTINGS } from "#/lib/constants";
-import Tooltip from "#/ui/tooltip";
-import { HelpCircle } from "lucide-react";
+import { InfoTooltip } from "#/ui/tooltip";
export default function IOSSection({
props,
@@ -35,9 +34,7 @@ export default function IOSSection({
<div className="flex items-center justify-between">
<div className="flex items-center justify-between space-x-2">
<h2 className="text-sm font-medium text-gray-900">iOS Targeting</h2>
- <Tooltip content="Redirect your iOS users to a different link (e.g. App Store link for your app).">
- <HelpCircle className="h-4 w-4 text-gray-600" />
- </Tooltip>
+ <InfoTooltip content="Redirect your iOS users to a different link (e.g. App Store link for your app)." />
</div>
<Switch fn={() => setEnabled(!enabled)} checked={enabled} />
</div>
diff --git a/components/app/modals/add-edit-link-modal/og-section.tsx b/components/app/modals/add-edit-link-modal/og-section.tsx
index 6cd4df67c2..e119213776 100644
--- a/components/app/modals/add-edit-link-modal/og-section.tsx
+++ b/components/app/modals/add-edit-link-modal/og-section.tsx
@@ -12,8 +12,7 @@ import { LoadingCircle } from "#/ui/icons";
import { LinkProps } from "#/lib/types";
import Switch from "#/ui/switch";
import { FADE_IN_ANIMATION_SETTINGS } from "#/lib/constants";
-import Tooltip from "#/ui/tooltip";
-import { HelpCircle } from "lucide-react";
+import { InfoTooltip } from "#/ui/tooltip";
export default function OGSection({
props,
@@ -73,9 +72,7 @@ export default function OGSection({
<h2 className="text-sm font-medium text-gray-900">
Custom Social Media Cards
</h2>
- <Tooltip content="Customize the title, description, and thumbnail image that will be shown when you share this link on social media.">
- <HelpCircle className="h-4 w-4 text-gray-600" />
- </Tooltip>
+ <InfoTooltip content="Customize the title, description, and thumbnail image that will be shown when you share this link on social media." />
</div>
<Switch
fn={() => setData((prev) => ({ ...prev, proxy: !proxy }))}
diff --git a/components/app/modals/add-edit-link-modal/password-section.tsx b/components/app/modals/add-edit-link-modal/password-section.tsx
index e2debf362e..0d8bb3ca24 100644
--- a/components/app/modals/add-edit-link-modal/password-section.tsx
+++ b/components/app/modals/add-edit-link-modal/password-section.tsx
@@ -4,8 +4,7 @@ import Switch from "#/ui/switch";
import { motion } from "framer-motion";
import { FADE_IN_ANIMATION_SETTINGS } from "#/lib/constants";
import { Eye, EyeOff } from "@/components/shared/icons";
-import Tooltip from "#/ui/tooltip";
-import { HelpCircle } from "lucide-react";
+import { InfoTooltip } from "#/ui/tooltip";
export default function PasswordSection({
props,
@@ -40,9 +39,7 @@ export default function PasswordSection({
<h2 className="text-sm font-medium text-gray-900">
Password Protection
</h2>
- <Tooltip content="Password protection allows you to restrict access to your link by encrypting it with a password. Only those who know the password will be able to access your link.">
- <HelpCircle className="h-4 w-4 text-gray-600" />
- </Tooltip>
+ <InfoTooltip content="Password protection allows you to restrict access to your link by encrypting it with a password. Only those who know the password will be able to access your link." />
</div>
<Switch fn={() => setEnabled(!enabled)} checked={enabled} />
</div>
diff --git a/components/app/modals/add-edit-link-modal/utm-section.tsx b/components/app/modals/add-edit-link-modal/utm-section.tsx
index 21e097a1fa..5a939b6892 100644
--- a/components/app/modals/add-edit-link-modal/utm-section.tsx
+++ b/components/app/modals/add-edit-link-modal/utm-section.tsx
@@ -9,8 +9,7 @@ import {
} from "#/lib/utils";
import Switch from "#/ui/switch";
import { FADE_IN_ANIMATION_SETTINGS } from "#/lib/constants";
-import Tooltip from "#/ui/tooltip";
-import { HelpCircle } from "lucide-react";
+import { InfoTooltip } from "#/ui/tooltip";
export default function UTMSection({
props,
@@ -61,9 +60,7 @@ export default function UTMSection({
<div className="flex items-center justify-between">
<div className="flex items-center justify-between space-x-2">
<h2 className="text-sm font-medium text-gray-900">UTM Builder</h2>
- <Tooltip content="UTM parameters are tags that will be added to the end of the destination URL. When your link is clicked, the tags are detected and tracked by your analytics software.">
- <HelpCircle className="h-4 w-4 text-gray-600" />
- </Tooltip>
+ <InfoTooltip content="UTM parameters are tags that will be added to the end of the destination URL. When your link is clicked, the tags are detected and tracked by your analytics software." />
</div>
<Switch fn={() => setEnabled(!enabled)} checked={enabled} />
</div>
diff --git a/components/app/modals/add-project-modal.tsx b/components/app/modals/add-project-modal.tsx
index 96a85a3734..fc794fbb38 100644
--- a/components/app/modals/add-project-modal.tsx
+++ b/components/app/modals/add-project-modal.tsx
@@ -18,6 +18,7 @@ import slugify from "@sindresorhus/slugify";
import va from "@vercel/analytics";
import Button from "#/ui/button";
import { toast } from "sonner";
+import { InfoTooltip } from "#/ui/tooltip";
function AddProjectModalHelper({
showAddProjectModal,
@@ -143,11 +144,11 @@ function AddProjectModalHelper({
className="flex flex-col space-y-6 bg-gray-50 px-4 py-8 text-left sm:px-16"
>
<div>
- <label
- htmlFor="name"
- className="block text-sm font-medium text-gray-700"
- >
- Project Name
+ <label htmlFor="name" className="flex items-center space-x-2">
+ <p className="block text-sm font-medium text-gray-700">
+ Project Name
+ </p>
+ <InfoTooltip content="This is the name of your project on Dub." />
</label>
<div className="mt-1 flex rounded-md shadow-sm">
<input
@@ -169,11 +170,11 @@ function AddProjectModalHelper({
</div>
<div>
- <label
- htmlFor="slug"
- className="block text-sm font-medium text-gray-700"
- >
- Project Slug
+ <label htmlFor="slug" className="flex items-center space-x-2">
+ <p className="block text-sm font-medium text-gray-700">
+ Project Slug
+ </p>
+ <InfoTooltip content="This is your project's unique slug on Dub." />
</label>
<div className="relative mt-1 flex rounded-md shadow-sm">
<span className="inline-flex items-center rounded-l-md border border-r-0 border-gray-300 bg-gray-50 px-5 text-gray-500 sm:text-sm">
@@ -216,11 +217,11 @@ function AddProjectModalHelper({
</div>
<div>
- <label
- htmlFor="domain"
- className="block text-sm font-medium text-gray-700"
- >
- Shortlink Domain
+ <label htmlFor="domain" className="flex items-center space-x-2">
+ <p className="block text-sm font-medium text-gray-700">
+ Shortlink Domain
+ </p>
+ <InfoTooltip content="This is the domain that your short links will be hosted on. E.g. yourbrand.com/link" />
</label>
<div className="relative mt-1 flex rounded-md shadow-sm">
<input
diff --git a/components/app/projects/settings/plan-usage.tsx b/components/app/projects/settings/plan-usage.tsx
index 56bf3dfaa2..586d89719d 100644
--- a/components/app/projects/settings/plan-usage.tsx
+++ b/components/app/projects/settings/plan-usage.tsx
@@ -3,14 +3,13 @@ import { useContext, useEffect, useMemo, useState } from "react";
import { motion } from "framer-motion";
import { Infinity, Divider } from "@/components/shared/icons";
import { LoadingDots } from "#/ui/icons";
-import Tooltip from "#/ui/tooltip";
+import { InfoTooltip } from "#/ui/tooltip";
import { fetcher, getFirstAndLastDay, nFormatter } from "#/lib/utils";
import useProject from "#/lib/swr/use-project";
import PlanBadge from "./plan-badge";
import { toast } from "sonner";
import useSWR, { mutate } from "swr";
import va from "@vercel/analytics";
-import { HelpCircle } from "lucide-react";
import { ModalContext } from "#/ui/modal-provider";
export default function PlanUsage() {
@@ -86,9 +85,7 @@ export default function PlanUsage() {
<div className="flex flex-col space-y-2 p-10">
<div className="flex items-center space-x-2">
<h3 className="font-medium">Total Link Clicks</h3>
- <Tooltip content="Number of billable link clicks across all your projects.">
- <HelpCircle className="h-4 w-4 text-gray-600" />
- </Tooltip>
+ <InfoTooltip content="Number of billable link clicks across all your projects." />
</div>
{usage !== undefined && usageLimit ? (
<p className="text-sm text-gray-600">
@@ -119,9 +116,7 @@ export default function PlanUsage() {
<div className="p-10">
<div className="flex items-center space-x-2">
<h3 className="font-medium">Number of Links</h3>
- <Tooltip content="Total number of short links in your project.">
- <HelpCircle className="h-4 w-4 text-gray-600" />
- </Tooltip>
+ <InfoTooltip content="Number of short links in your project." />
</div>
<div className="mt-4 flex items-center">
{links || links === 0 ? (
diff --git a/contentlayer.config.ts b/contentlayer.config.ts
index bd8d052533..5eddc4bd61 100644
--- a/contentlayer.config.ts
+++ b/contentlayer.config.ts
@@ -1,4 +1,8 @@
-import { defineDocumentType, makeSource } from "contentlayer/source-files";
+import {
+ defineDocumentType,
+ defineNestedType,
+ makeSource,
+} from "contentlayer/source-files";
import remarkGfm from "remark-gfm";
import rehypePrettyCode from "rehype-pretty-code";
import rehypeSlug from "rehype-slug";
@@ -57,16 +61,26 @@ export const HelpPost = defineDocumentType(() => ({
type: "string",
required: true,
},
- category: {
- type: "enum",
- options: [
- "overview",
- "getting-started",
- "link-management",
- "custom-domains",
- "api",
- ],
- default: "overview",
+ categories: {
+ type: "list",
+ of: {
+ type: "enum",
+ options: [
+ "overview",
+ "getting-started",
+ "link-management",
+ "custom-domains",
+ "api",
+ ],
+ default: "overview",
+ },
+ required: true,
+ },
+ related: {
+ type: "list",
+ of: {
+ type: "string",
+ },
},
},
// @ts-ignore
@@ -112,8 +126,8 @@ const computedFields = (type: "changelog" | "help" | "legal") => ({
images: {
type: "array",
resolve: (doc) => {
- return doc.body.raw.match(
- /(?<=<BlurImage[^>]*\bsrc=")[^"]+(?="[^>]*\/>)/g,
+ return (
+ doc.body.raw.match(/(?<=<Image[^>]*\bsrc=")[^"]+(?="[^>]*\/>)/g) || []
);
},
},
diff --git a/lib/constants/content.tsx b/lib/constants/content.tsx
index cb9e423725..114ccd4033 100644
--- a/lib/constants/content.tsx
+++ b/lib/constants/content.tsx
@@ -1,16 +1,26 @@
-import { Logo } from "@/components/shared/icons";
+import { Logo } from "#/ui/icons";
import { Globe, Link2, Settings, Webhook } from "lucide-react";
export const POPULAR_ARTICLES = [
"what-is-dub",
+ "what-is-a-project",
"how-to-add-custom-domain",
"how-to-use-tags",
"how-to-invite-teammates",
- "dub-api",
"how-to-upgrade",
];
-export const CATEGORIES = [
+export const CATEGORIES: {
+ title: string;
+ slug:
+ | "overview"
+ | "getting-started"
+ | "link-management"
+ | "custom-domains"
+ | "api";
+ description: string;
+ icon: JSX.Element;
+}[] = [
{
title: "Dub Overview",
slug: "overview",
diff --git a/lib/images.ts b/lib/images.ts
index 7722326f7f..4b23f89155 100644
--- a/lib/images.ts
+++ b/lib/images.ts
@@ -14,12 +14,3 @@ export async function getBlurDataURL(url: string | null) {
return "data:image/webp;base64,AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
}
}
-
-export function getImages(urls: string[]) {
- return Promise.all(
- urls.map(async (url) => ({
- url,
- blurDataURL: await getBlurDataURL(url),
- })),
- );
-}
diff --git a/pages/api/og/help.tsx b/pages/api/og/help.tsx
new file mode 100644
index 0000000000..99e41c365e
--- /dev/null
+++ b/pages/api/og/help.tsx
@@ -0,0 +1,140 @@
+/* eslint-env node */
+import { ImageResponse } from "@vercel/og";
+import { NextRequest } from "next/server";
+
+export const config = {
+ runtime: "edge",
+};
+
+const satoshiBold = fetch(
+ new URL("@/styles/Satoshi-Bold.ttf", import.meta.url),
+).then((res) => res.arrayBuffer());
+
+const interMedium = fetch(
+ new URL("@/styles/Inter-Medium.ttf", import.meta.url),
+).then((res) => res.arrayBuffer());
+
+export default async function (req: NextRequest) {
+ const [satoshiBoldData, interMediumData] = await Promise.all([
+ satoshiBold,
+ interMedium,
+ ]);
+
+ const { searchParams } = new URL(req.url);
+
+ const hasTitle = searchParams.has("title");
+ const title = hasTitle
+ ? searchParams.get("title")?.slice(0, 100)
+ : "Nextra Documentation";
+
+ return new ImageResponse(
+ (
+ <div
+ style={{
+ height: "100%",
+ width: "100%",
+ display: "flex",
+ flexDirection: "column",
+ alignItems: "flex-start",
+ justifyContent: "center",
+ padding: 80,
+ backgroundColor: "#030303",
+ backgroundImage:
+ "radial-gradient(circle at 25px 25px, #333 2%, transparent 0%), radial-gradient(circle at 75px 75px, #333 2%, transparent 0%)",
+ backgroundSize: "100px 100px",
+ backgroundPosition: "-30px -10px",
+ fontWeight: 600,
+ color: "white",
+ }}
+ >
+ <svg
+ style={{ position: "absolute", top: 70, left: 80 }}
+ height="40"
+ viewBox="0 0 834 236"
+ fill="none"
+ xmlns="http://www.w3.org/2000/svg"
+ >
+ <path
+ d="M266 119.5C266 181.632 215.632 232 153.5 232C91.368 232 41 181.632 41 119.5C41 57.368 91.368 7 153.5 7C215.632 7 266 57.368 266 119.5Z"
+ fill="currentColor"
+ />
+ <mask
+ id="mask0_46_2"
+ style={{
+ maskType: "alpha",
+ }}
+ maskUnits="userSpaceOnUse"
+ x="41"
+ y="7"
+ width="225"
+ height="225"
+ >
+ <path
+ d="M266 119.5C266 181.632 215.632 232 153.5 232C91.368 232 41 181.632 41 119.5C41 57.368 91.368 7 153.5 7C215.632 7 266 57.368 266 119.5Z"
+ fill="currentColor"
+ />
+ </mask>
+ <g mask="url(#mask0_46_2)">
+ <ellipse cx="153" cy="124.5" rx="58" ry="57.5" fill="black" />
+ <path d="M185 -10H211V181H185V-10Z" fill="black" />
+ </g>
+ <path
+ d="M397.25 213.75C385.25 213.75 374.833 211.083 366 205.75C357.167 200.417 350.25 192.917 345.25 183.25C340.417 173.417 338 161.917 338 148.75C338 135.417 340.5 123.75 345.5 113.75C350.5 103.583 357.583 95.6667 366.75 90C376.083 84.3333 387.083 81.5 399.75 81.5C407.583 81.5 414.833 82.9167 421.5 85.75C428.333 88.5833 433.583 92.3333 437.25 97V22H475.75V210.5H439.5L437.5 194.5C434.167 200.167 428.833 204.833 421.5 208.5C414.333 212 406.25 213.75 397.25 213.75ZM406.5 178.5C412.5 178.5 417.75 177.25 422.25 174.75C426.917 172.083 430.5 168.417 433 163.75C435.667 158.917 437 153.417 437 147.25C437 140.917 435.667 135.417 433 130.75C430.5 126.083 426.917 122.5 422.25 120C417.75 117.333 412.5 116 406.5 116C400.5 116 395.25 117.333 390.75 120C386.25 122.667 382.75 126.333 380.25 131C377.917 135.667 376.75 141.083 376.75 147.25C376.75 153.417 377.917 158.833 380.25 163.5C382.75 168.167 386.25 171.833 390.75 174.5C395.25 177.167 400.5 178.5 406.5 178.5Z"
+ fill="currentColor"
+ />
+ <path
+ d="M587.662 85.5H626.162C626.162 85.5 626.162 148.5 626.162 164C626.162 179.5 623.786 191.5 616.5 200.5C609.214 209.5 594 213.75 582.162 213.75C570.324 213.75 564.412 213.75 564.412 213.75C564.412 213.75 556.662 213.75 549.162 213.75C534.995 213.75 523.745 209.333 515.412 200.5C507.245 191.5 503.162 179.333 503.162 164V85.5H541.662V150C541.662 160.167 543.495 167.667 547.162 172.5C550.829 177.167 556.579 179.5 564.412 179.5C572.745 179.5 578.662 177.25 582.162 172.75C585.829 168.083 587.662 160.667 587.662 150.5V85.5Z"
+ fill="currentColor"
+ />
+ <path
+ d="M691.303 210.5H655.053V22H693.553V100C697.386 94.3333 703.053 89.8333 710.553 86.5C718.219 83 726.553 81.25 735.553 81.25C747.219 81.25 757.303 84.0833 765.803 89.75C774.469 95.4167 781.136 103.333 785.803 113.5C790.469 123.667 792.803 135.583 792.803 149.25C792.803 162.083 790.219 173.417 785.053 183.25C780.053 192.917 772.969 200.417 763.803 205.75C754.803 211.083 744.386 213.75 732.553 213.75C723.886 213.75 715.969 212 708.803 208.5C701.803 204.833 696.636 200.167 693.303 194.5L691.303 210.5ZM693.803 147.25C693.803 153.417 695.053 158.917 697.553 163.75C700.219 168.417 703.803 172.083 708.303 174.75C712.969 177.25 718.303 178.5 724.303 178.5C730.469 178.5 735.719 177.167 740.053 174.5C744.553 171.833 747.969 168.167 750.303 163.5C752.803 158.833 754.053 153.417 754.053 147.25C754.053 141.083 752.803 135.667 750.303 131C747.969 126.333 744.553 122.667 740.053 120C735.719 117.333 730.469 116 724.303 116C718.303 116 712.969 117.333 708.303 120C703.803 122.5 700.219 126.083 697.553 130.75C695.053 135.417 693.803 140.917 693.803 147.25Z"
+ fill="currentColor"
+ />
+ </svg>
+ <p
+ style={{
+ position: "absolute",
+ bottom: 70,
+ left: 80,
+ margin: 0,
+ fontSize: 30,
+ fontFamily: "Inter Medium",
+ letterSpacing: -1,
+ }}
+ >
+ Create beautiful websites with Next.js & MDX.
+ </p>
+ <h1
+ style={{
+ fontSize: 82,
+ fontFamily: "Satoshi Bold",
+ margin: "0 0 40px -2px",
+ lineHeight: 1.1,
+ textShadow: "0 2px 30px #000",
+ letterSpacing: -4,
+ backgroundImage: "linear-gradient(90deg, #fff 40%, #aaa)",
+ backgroundClip: "text",
+ "-webkit-background-clip": "text",
+ color: "transparent",
+ }}
+ >
+ {title}
+ </h1>
+ </div>
+ ),
+ {
+ width: 1200,
+ height: 630,
+ fonts: [
+ {
+ name: "Satoshi Bold",
+ data: satoshiBoldData,
+ },
+ {
+ name: "Inter Medium",
+ data: interMediumData,
+ },
+ ],
+ },
+ );
+}
diff --git a/pages/app/[slug]/settings/index.tsx b/pages/app/[slug]/settings/index.tsx
index 474eb14bcd..1754d07ec7 100644
--- a/pages/app/[slug]/settings/index.tsx
+++ b/pages/app/[slug]/settings/index.tsx
@@ -45,7 +45,7 @@ export default function ProjectSettingsGeneral() {
/>
<Form
title="Project Slug"
- description="This is your project's URL slug on Dub."
+ description="This is your project's unique slug on Dub."
inputData={{
name: "slug",
defaultValue: slug,
diff --git a/posts/help/dub-api.mdx b/posts/help/dub-api.mdx
index ebe429dc18..ce1a416f90 100644
--- a/posts/help/dub-api.mdx
+++ b/posts/help/dub-api.mdx
@@ -3,7 +3,8 @@ title: Does Dub have an API?
updatedAt: 2023-07-18
summary: Dub has an API that allows you to create, update, and delete links programmatically.
author: steventey
-category: api
+categories:
+ - api
---
No, Dub does not have an API yet, but it is planned for the future.
diff --git a/posts/help/how-long-to-verify-domain.mdx b/posts/help/how-long-to-verify-domain.mdx
new file mode 100644
index 0000000000..56c243cedb
--- /dev/null
+++ b/posts/help/how-long-to-verify-domain.mdx
@@ -0,0 +1,10 @@
+---
+title: How long do I have to wait when verifying my domain on Dub?
+updatedAt: 2023-07-18
+summary: A guide on how to use tags to better manage your links on Dub.s
+author: steventey
+categories:
+ - custom-domains
+---
+
+Here's how to use tags to better manage your links on Dub.
diff --git a/posts/help/how-to-add-custom-domain.mdx b/posts/help/how-to-add-custom-domain.mdx
index 6081d15a81..920f9b6f49 100644
--- a/posts/help/how-to-add-custom-domain.mdx
+++ b/posts/help/how-to-add-custom-domain.mdx
@@ -1,9 +1,29 @@
---
title: How to add a custom domain to Dub
updatedAt: 2023-07-18
-summary: Learn how to add a custom domain to Dub.
+summary: Learn how to add a custom domain to Dub for free - no credit card required.
author: steventey
-category: custom-domains
+categories:
+ - custom-domains
+ - getting-started
+related:
+ - how-long-to-verify-domain
---
-Here's how to add a custom domain to Dub.
+Dub is the only link management tool that allows you to add a custom domain for free. This guide will show you how to add a custom domain to Dub.
+
+## Prerequisites
+
+Before you begin, you'll need the following:
+
+- A Dub account. If you don't have one, you can [create one for free](https://app.dub.sh/register).
+- A domain name. If you don't have one, you can purchase one from any one of the following domain registrars:
+ - [Namecheap](https://www.namecheap.com/)
+ - [GoDaddy](https://www.godaddy.com/)
+ - [Google Domains](https://domains.google/)
+ - [Name.com](https://www.name.com/)
+
+## Step 1: Add a custom domain
+
+1. Log in to your Dub account.
+2.
diff --git a/posts/help/how-to-create-link.mdx b/posts/help/how-to-create-link.mdx
new file mode 100644
index 0000000000..2a07a9a7de
--- /dev/null
+++ b/posts/help/how-to-create-link.mdx
@@ -0,0 +1,15 @@
+---
+title: How to create a short link on Dub?
+updatedAt: 2023-07-18
+summary: Learn how to create your first short link on Dub and start tracking your links.
+author: steventey
+categories:
+ - link-management
+ - getting-started
+---
+
+## Introduction
+
+## Dub.sh links
+
+## Custom short links
diff --git a/posts/help/how-to-import-bitly-links.mdx b/posts/help/how-to-import-bitly-links.mdx
new file mode 100644
index 0000000000..1429f818bd
--- /dev/null
+++ b/posts/help/how-to-import-bitly-links.mdx
@@ -0,0 +1,10 @@
+---
+title: How to import my Bitly links to Dub
+updatedAt: 2023-07-18
+summary: Here's how to import your Bitly links to Dub.
+author: steventey
+categories:
+ - link-management
+---
+
+Here's how to use tags to better manage your links on Dub.
diff --git a/posts/help/how-to-invite-teammates.mdx b/posts/help/how-to-invite-teammates.mdx
index 46a222ad11..64fa1e3502 100644
--- a/posts/help/how-to-invite-teammates.mdx
+++ b/posts/help/how-to-invite-teammates.mdx
@@ -1,9 +1,10 @@
---
-title: How to invite teammates to Dub?
+title: How to invite teammates on Dub
updatedAt: 2023-07-18
summary: This article will show you how to invite teammates to Dub.
author: steventey
-category: overview
+categories:
+ - overview
---
## Introduction
diff --git a/posts/help/how-to-upgrade.mdx b/posts/help/how-to-upgrade.mdx
index 5fb9fecca2..902c434957 100644
--- a/posts/help/how-to-upgrade.mdx
+++ b/posts/help/how-to-upgrade.mdx
@@ -1,9 +1,10 @@
---
-title: How to upgrade to Dub Pro?
+title: How to upgrade to Dub Pro
updatedAt: 2023-07-18
summary: How to upgrade to Dub Pro?
author: steventey
-category: overview
+categories:
+ - overview
---
## Introduction
diff --git a/posts/help/how-to-use-tags.mdx b/posts/help/how-to-use-tags.mdx
index 7adb5c5a0b..e3fadcad45 100644
--- a/posts/help/how-to-use-tags.mdx
+++ b/posts/help/how-to-use-tags.mdx
@@ -1,9 +1,10 @@
---
title: How to use Tags on Dub
updatedAt: 2023-07-18
-summary: A guide on how to use tags to better manage your links on Dub.s
+summary: Learn more about what a "Tag" is and how you can use it to better manage your links on Dub.
author: steventey
-category: link-management
+categories:
+ - link-management
---
Here's how to use tags to better manage your links on Dub.
diff --git a/posts/help/what-is-a-project.mdx b/posts/help/what-is-a-project.mdx
new file mode 100644
index 0000000000..39b3abfeea
--- /dev/null
+++ b/posts/help/what-is-a-project.mdx
@@ -0,0 +1,67 @@
+---
+title: What is a "Project" on Dub?
+updatedAt: 2023-07-18
+summary: Learn more about what a "Project" is on Dub and how you can use it to organize your links.
+author: steventey
+categories:
+ - overview
+ - getting-started
+ - link-management
+related:
+ - how-to-create-link
+ - how-to-add-custom-domain
+ - how-to-invite-teammates
+---
+
+On Dub, a "Project" is a space that you can use to store all the short links for your website, app, or business.
+
+You can think of a Dub project as a "Team" – you can [invite your teammates](how-to-invite-teammates) to join your project and manage the links together.
+
+## How to create a project
+
+To create a project, go to the [Dub Dashboard](https://app.dub.sh/) and click on the "Create project" button.
+
+<Image
+ alt="Screenshot of the project creation modal in Dub"
+ src="https://d2vwwcvoksz7ty.cloudfront.net/help/create-project-modal.png"
+ width={1315}
+ height={871}
+/>
+
+Here are the fields in the project creation modal:
+
+1. **Project Name**: This is the name of your project on Dub.
+2. **Project Slug**: This is your project's unique slug on Dub.
+3. **Shortlink Domain**: This is the domain that your short links will be hosted on. E.g. `yourbrand.com/link`.
+
+Once you have filled in the fields, click on the "Create project" button to create your project.
+
+## Onboarding checklist
+
+After you have created your project, you will be redirected to the project dashboard. Here, you will see a checklist of things that you can do to get started with your project.
+
+<Image
+ alt="Onboarding checklist for a new project in Dub"
+ src="https://d2vwwcvoksz7ty.cloudfront.net/help/onboarding-checklist.png"
+ width={1529}
+ height={978}
+/>
+
+1. **Configure your custom domain**: You can [configure your custom domain](how-to-add-custom-domain) to use your own domain for your short links.
+2. **Create or import your links**: You can [create links](how-to-create-link) or [import existing ones](how-to-import-bitly-links) to your project.
+3. **Invite your teammates**: You can [invite your teammates](how-to-invite-teammates) to join your project and manage the links together.
+
+## How many domains can I add to a project?
+
+You can [add as many domains](how-to-add-custom-domain) as you want to a project. If your project has multiple domains, you will be able to filter the links in the project by their respective domains.
+
+<Image
+ alt="Filtering links by domain in Dub"
+ src="https://d2vwwcvoksz7ty.cloudfront.net/changelog/unlimited-domains.png"
+ width={1607}
+ height={945}
+/>
+
+## Limits and Billing for Projects
+
+There is no limit as to how many projects you can create on Dub – you can create as many projects as you want, and each project will be billed separately.
diff --git a/posts/help/what-is-dub.mdx b/posts/help/what-is-dub.mdx
index 48718f81d1..564266bce5 100644
--- a/posts/help/what-is-dub.mdx
+++ b/posts/help/what-is-dub.mdx
@@ -1,9 +1,10 @@
---
-title: What Is Dub?
-updatedAt: 2023-07-18
+title: What is Dub?
+updatedAt: 2023-07-20
summary: How Dub works, what it can do for your business and what makes it different to other solutions.
author: steventey
-category: overview
+categories:
+ - overview
---
[Dub](https://dub.sh) is the link management tool for modern marketing teams. Shorten and track all your links, and gain powerful insights into your marketing efforts.