Skip to content

Commit

Permalink
feat(content): create Til definition
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusfg7 committed Nov 28, 2023
1 parent 101e096 commit 1310cbc
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions content/definitions/Til.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { defineDocumentType } from 'contentlayer/source-files'

export const Til = defineDocumentType(() => ({
name: 'TIL',
contentType: 'mdx',
filePathPattern: 'til/*.mdx',
fields: {
title: {
type: 'string',
required: true
},
description: {
type: 'string',
required: true
},
tags: {
type: 'list',
of: { type: 'string' },
required: true
},
date: {
type: 'date',
required: true
}
}
}))

0 comments on commit 1310cbc

Please sign in to comment.