Mirror of the sourcecode for my blog, original repo: https://github.com/NobbZ/blog-nobbz-dev
Something went wrong. Try again.
12345678910111213141516171819202122// SPDX-FileCopyrightText: 2025 Norbert Melzer// SPDX-FileContributor: Norbert Melzer//// SPDX-License-Identifier: MIT
import type { CollectionEntry } from "astro:content";
import { DateTime } from "luxon";
export const postPath = (post: CollectionEntry<"blog">): string => { const date = DateTime.fromJSDate(post.data.date).toFormat("yyyy-MM-dd"); const slug = post.slug;
return `/blog/${date}-${slug}`;};
export const authorPath = (author: CollectionEntry<"authors">): string => { const slug = author.slug;
return `/authors/${slug}`;};