feat: set up basic blog structure

This commit is contained in:
Felix Schröter 2022-08-01 21:12:47 +02:00
parent f4f421ac43
commit 8599464f2d
Signed by: felschr
GPG key ID: 671E39E6744C807D
7 changed files with 1740 additions and 88 deletions

View file

@ -0,0 +1,33 @@
import * as React from "react"
import { graphql, PageProps } from "gatsby"
import { MDXRenderer } from "gatsby-plugin-mdx"
import Layout from "../../components/organisms/Layout"
import { defineCustomElements as deckDeckGoHighlightElement } from "@deckdeckgo/highlight-code/dist/loader";
deckDeckGoHighlightElement();
const BlogPost = ({ data: { mdx } }: PageProps<Queries.BlogPostQuery>) => {
return (
<Layout pageTitle={mdx?.frontmatter?.title ?? ""}>
<MDXRenderer>
{mdx?.body ?? ""}
</MDXRenderer>
</Layout>
)
}
export const query = graphql`
query BlogPost($id: String) {
mdx(id: {eq: $id}) {
id
body
frontmatter {
title
published
updated
}
}
}
`
export default BlogPost