@atooni/gatsby-theme-ziodoc
Version:
A Gatsby theme for ZIO micro sites
28 lines (21 loc) • 460 B
JavaScript
import * as React from "react";
import { graphql } from "gatsby";
import { MDXRenderer } from "gatsby-plugin-mdx";
const Simple = ({data}) => {
const page = data.mdx;
return (
<div className="container mx-auto">
<MDXRenderer>{page.body}</MDXRenderer>
</div>
)
}
export default Simple;
export const query = graphql`
query($filePath: String!) {
mdx(fileAbsolutePath: {eq: $filePath}) {
id
slug
body
}
}
`