Skip to content

Create a Post

Christopher Schicho edited this page Jan 24, 2024 · 2 revisions

In order to create a new post add a *.mdx in data/blog/**. start the content with the meta data header. besides that you can handle it like a markdown.

The following type covers the post meta data.

type Blog = {
  /** File path relative to `contentDirPath` */
  _id: string
  _raw: Local.RawDocumentData
  type: 'Blog'
  title: string
  date: IsoDateTimeString
  tags: string[]
  lastmod?: IsoDateTimeString | undefined
  draft?: boolean | undefined
  summary?: string | undefined
  images?: any | undefined
  authors?: string[] | undefined
  layout?: string | undefined
  bibliography?: string | undefined
  canonicalUrl?: string | undefined
  /** MDX file body */
  body: MDX
  readingTime: json
  slug: string
  path: string
  filePath: string
  toc: string
  structuredData: json
}  
Clone this wiki locally