-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-template.js
48 lines (42 loc) · 926 Bytes
/
page-template.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// src/templates/page-template.js
import { graphql } from 'gatsby';
import React from 'react'
import Layout from '../components/Layout.js';
import PageHeader from '../components/PageHeader.js';
const PageTemplate = (props) => {
console.log(props.data);
return (
<Layout>
<PageHeader frontmatter={props.data.markdownRemark.frontmatter} />
<div
dangerouslySetInnerHTML={{
__html: props.data.markdownRemark.html
}}
className='
container
py-8 px-4
md:px-0
prose
prose-p:text-stone-900
prose-img:rounded-lg
'>
</div>
</Layout>
)
}
export const query = graphql`
query($pageId: String = "") {
markdownRemark(id: { eq: $pageId }) {
id
fields {
slug
}
frontmatter {
title
description
}
html
}
}
`
export default PageTemplate