refactor "notes" into "posts" (only on the backend)

This commit is contained in:
2024-02-26 12:08:48 -05:00
parent 955cfe421f
commit dbde73c63c
19 changed files with 201 additions and 202 deletions
+25
View File
@@ -0,0 +1,25 @@
import type { MDXRemoteSerializeResult } from "next-mdx-remote";
export type PostFrontMatter = {
slug: string;
permalink: string;
date: string;
title: string;
htmlTitle?: string;
description?: string;
image?: string;
tags?: string[];
noComments?: boolean;
};
export type PostWithSource = {
// yaml metadata
frontMatter: PostFrontMatter;
// the final, compiled JSX by next-mdx-remote; see lib/helpers/posts.ts
source: Partial<Pick<MDXRemoteSerializeResult<Record<string, never>, Record<string, never>>>>;
};
export type PostsByYear = {
[year: string]: PostFrontMatter[];
};