Skip to content

Commit

Permalink
add blog posts to config
Browse files Browse the repository at this point in the history
  • Loading branch information
ob6160 committed May 29, 2024
1 parent a748ce6 commit 729da0d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions public/admin/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,12 @@ collections:
- { label: "Publish Date", name: "date", widget: "datetime" }
- { label: "Author", name: "author", widget: "string" }
- { label: "Body", name: "body", widget: "markdown" }
- name: "posts"
label: "Blog Posts"
label_singular: 'Blog Post'
folder: content/posts
fields:
- { label: "Title", name: "title", widget: "string"}
- { label: "Publish Date", name: "date", widget: "datetime" }
- { label: "Author", name: "author", widget: "string" }
- { label: "Body", name: "body", widget: "markdown" }
2 changes: 1 addition & 1 deletion src/pages/posts/[slug]/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function PostPage({
postData,
notFound,
}: InferGetStaticPropsType<typeof getStaticProps>) {
if (!notFound) return null;
if (notFound) return null;
return (
<Box my={5}>
<Head>
Expand Down

0 comments on commit 729da0d

Please sign in to comment.