diff --git a/content/pages/home.md b/content/pages/home.mdx similarity index 100% rename from content/pages/home.md rename to content/pages/home.mdx diff --git a/contentlayer.config.ts b/contentlayer.config.ts index fbb4832fa..c6c3dd3dd 100644 --- a/contentlayer.config.ts +++ b/contentlayer.config.ts @@ -18,8 +18,8 @@ export const Post = defineDocumentType(() => ({ export const Page = defineDocumentType(() => ({ name: 'Page', - filePathPattern: `pages/**/*.md`, - contentType: 'markdown', + filePathPattern: `pages/**/*.mdx`, + contentType: 'mdx', fields: { title: { type: 'string', required: true }, date: { type: 'date', required: true }, diff --git a/public/admin/config.yml b/public/admin/config.yml index 5a4a1e62e..b8318fe46 100644 --- a/public/admin/config.yml +++ b/public/admin/config.yml @@ -13,11 +13,11 @@ public_folder: /images/uploads collections: - name: "pages" label: "Pages" - files: - - label: "Home" - name: "home" - file: "content/pages/home.md" - fields: - - { label: "Title", name: "title", widget: "string"} - - { label: "Publish Date", name: "date", widget: "datetime" } - - { label: "Author", name: "author", widget: "string" } + label_singular: 'Documentation' + folder: content/pages + extension: "mdx" + format: "frontmatter" + fields: + - { label: "Title", name: "title", widget: "string"} + - { label: "Publish Date", name: "date", widget: "datetime" } + - { label: "Author", name: "author", widget: "string" }