forked from jk715/docs.hackerone.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprograms.js
More file actions
34 lines (32 loc) · 906 Bytes
/
Copy pathprograms.js
File metadata and controls
34 lines (32 loc) · 906 Bytes
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
import React from 'react'
import Link from 'gatsby-link'
import Article from '../components/article/article'
import programsNav from '../pages/programs/programs-nav.yaml'
export default function Template({ data }) {
const { markdownRemark } = data
return (
<Article
links={programsNav}
path={markdownRemark.frontmatter.path}
title={markdownRemark.frontmatter.title}
description={markdownRemark.frontmatter.description}
docOnGithub={`${markdownRemark.frontmatter.id}.md`}
>
<h1>{markdownRemark.frontmatter.title}</h1>
<div dangerouslySetInnerHTML={{ __html: markdownRemark.html }} />
</Article>
)
}
export const pageQuery = graphql`
query programsDocByPath($path: String!) {
markdownRemark(frontmatter: { path: { eq: $path } }) {
html
frontmatter {
path
id
title
description
}
}
}
`