Just use frontmatter paths for paths + cleanups
This commit is contained in:
parent
4936e80940
commit
d2e2bc8df7
6 changed files with 33 additions and 63 deletions
|
|
@ -14,7 +14,9 @@ class BlogPostTemplate extends React.Component {
|
|||
return (
|
||||
<div>
|
||||
<Helmet title={`${post.frontmatter.title} | ${siteTitle}`} />
|
||||
<h1>{post.frontmatter.title}</h1>
|
||||
<h1>
|
||||
{post.frontmatter.title}
|
||||
</h1>
|
||||
<p
|
||||
style={{
|
||||
...scale(-1 / 5),
|
||||
|
|
@ -40,14 +42,14 @@ class BlogPostTemplate extends React.Component {
|
|||
export default BlogPostTemplate
|
||||
|
||||
export const pageQuery = graphql`
|
||||
query BlogPostByPath($slug: String!) {
|
||||
query BlogPostByPath($path: String!) {
|
||||
site {
|
||||
siteMetadata {
|
||||
title
|
||||
author
|
||||
}
|
||||
}
|
||||
markdownRemark(fields: { slug: { eq: $slug }}) {
|
||||
markdownRemark(frontmatter: { path: { eq: $path } }) {
|
||||
id
|
||||
html
|
||||
frontmatter {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue