feat: add generic content page

This commit is contained in:
David Nguyen
2023-07-28 09:58:47 +10:00
parent 6038c3cc78
commit dfcfe1d8d2
3 changed files with 46 additions and 17 deletions

View File

@ -18,9 +18,9 @@ export const BlogPost = defineDocumentType(() => ({
},
}));
export const Privacy = defineDocumentType(() => ({
name: 'Privacy',
filePathPattern: 'privacy.mdx',
export const GenericPage = defineDocumentType(() => ({
name: 'GenericPage',
filePathPattern: '**/*.mdx',
contentType: 'mdx',
fields: {
title: { type: 'string', required: true },
@ -30,4 +30,4 @@ export const Privacy = defineDocumentType(() => ({
},
}));
export default makeSource({ contentDirPath: 'content', documentTypes: [BlogPost, Privacy] });
export default makeSource({ contentDirPath: 'content', documentTypes: [BlogPost, GenericPage] });