// src/components/layout.js import React from "react" import SLink from "../components/SLink.js" import Zine from "../components/Zine.js" import { MDXRenderer } from "gatsby-plugin-mdx" import { MDXProvider } from '@mdx-js/react' import Layout from "../layouts/layout.js"; import {Link} from "gatsby"; // simple template for testing // export default function PageTemplate({ data: { mdx } }) { // return ( //
//

{mdx.frontmatter.title}

// // }}> // {mdx.body} // //
// ) // } class MdxArticle extends React.Component { render() { var articleClass = "markdownWrapper " + this.props.post.frontmatter.style; return (

{this.props.post.frontmatter.title}

{this.props.post.frontmatter.author ? {this.props.post.frontmatter.author} • : null } {this.props.post.frontmatter.date}

{this.props.post.frontmatter.note ?

: null}
{this.props.mdx.body}
) } } export default function MdxTemplate({ data: { mdx }}) { const post = mdx var pageType = post.frontmatter.type; if (!pageType) { pageType = 'blog;' } var noHeader = false; var hideFooter = false; if (pageType === 'blog') { noHeader = true; } if (pageType === 'zine') { hideFooter = true; } return ( {(()=> { switch (pageType) { case 'blog': return ; case 'zine': return default: return null; } })()} ) } export const pageQuery = graphql` query BlogPostQuery($id: String) { mdx(id: { eq: $id }) { id body frontmatter { date(formatString: "MMMM DD, YYYY") path gumroadPath title description author style image images price type } } } `