GudCalGudCal
Docs
Blog

Blog

How the blog works with categories and authors.

Blog posts can have multiple categories, authors and related posts.

Authors

Create one author

Blog posts can have one or multiple authors.
Add a new object with name, image url and twitter handle to add a new author to your blog.

config/blog.ts
export const BLOG_AUTHORS = {
  timchosen: {
    name: "timchosen",
    image: "/_static/avatars/timchosen.png",
    twitter: "timchosen",
  },
  newauthor: {
    name: "New Author",
    image: "/_static/avatars/newauthor.png",
    twitter: "newauthor",
  },
};

Add in a blog post

Add your new author in your blog post like that :

---
title: Why We Built GudCal
description: The story behind building open-source scheduling infrastructure.
image: /_static/blog/blog-post-3.jpg
date: "2025-01-02"
authors:
  - timchosen
categories:
  - news
related:
  - server-client-components
  - preview-mode-headless-cms
---

Categories

Create one category

Add a new object and a slug to add a new category to your blog.

config/blog.ts
export const BLOG_CATEGORIES: {
  title: string;
  slug: "news" | "education";
  description: string;
}[] = [
  {
    title: "News",
    slug: "news",
    description: "Updates and announcements from GudCal.",
  },
  {
    title: "Education",
    slug: "education",
    description: "Educational content about scheduling and productivity.",
  },
];

Add in a blog post

Add your category in your blog post like that :

---
title: Why We Built GudCal
description: The story behind building open-source scheduling infrastructure.
image: /_static/blog/blog-post-3.jpg
date: "2025-01-02"
authors:
  - timchosen
categories:
  - news
related:
  - server-client-components
  - preview-mode-headless-cms
---

The blog post can belong to multiple categories, but currently, only the first category in the list is being displayed.

Each blog post can have a list of related posts.
Get the filenames of the blog posts that you want and remove the .mdx or .md. That's all!

---
title: Why We Built GudCal
description: The story behind building open-source scheduling infrastructure.
image: /_static/blog/blog-post-3.jpg
date: "2025-01-02"
authors:
  - timchosen
categories:
  - news
related:
  - server-client-components
  - preview-mode-headless-cms
---