-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-templates-post-tsx-d1a138913a50677b6feb.js.map
1 lines (1 loc) · 3.86 KB
/
component---src-templates-post-tsx-d1a138913a50677b6feb.js.map
1
{"version":3,"sources":["webpack:///./src/templates/Post.tsx"],"names":["PostContent","styled","div","props","pathContext","prev","next","post","data","markdownRemark","postPath","fields","slug","postNode","postSEO","title","frontmatter","config","siteTitle","banner","to","date","timeToRead","category","dangerouslySetInnerHTML","__html","html","tags","map","tag","i","key","length","query"],"mappings":"0QAoBMA,G,UAAcC,IAAOC,IAAV,oEAAGD,CAAH,uBAWF,mBAACE,GAAiB,MACRA,EAAMC,YAArBC,EADuB,EACvBA,KAAMC,EADiB,EACjBA,KACRC,EAAOJ,EAAMK,KAAKC,eAExB,OACE,kBAAC,IAAD,KACGF,EACC,oCACE,kBAAC,IAAD,CAAKG,SAAUH,EAAKI,OAAOC,KAAMC,SAAUN,EAAMO,SAAS,IAC1D,kBAAC,IAAD,CAAQC,MAAUR,EAAKS,YAAYD,MAAtB,MAAiCE,IAAOC,YACrD,kBAAC,IAAD,CAAQC,OAAQZ,EAAKS,YAAYG,QAC/B,kBAAC,OAAD,CAAMC,GAAG,KAAKH,IAAOC,WACrB,kBAAC,IAAD,KAAeX,EAAKS,YAAYD,OAChC,kBAAC,IAAD,KACGR,EAAKS,YAAYK,KADpB,MACmCd,EAAKe,WADxC,iBACwE,IACtE,kBAAC,OAAD,CAAMF,GAAE,eAAiB,IAAUb,EAAKS,YAAYO,WACjDhB,EAAKS,YAAYO,YAIxB,kBAAC,IAAD,KACE,kBAAC,IAAD,KACE,kBAACvB,EAAD,CAAawB,wBAAyB,CAAEC,OAAQlB,EAAKmB,QACpDnB,EAAKS,YAAYW,KAChB,kBAAC,IAAD,eAEGpB,EAAKS,YAAYW,KAAKC,KAAI,SAACC,EAAKC,GAAN,OACzB,kBAAC,OAAD,CAAMC,IAAKD,EAAGV,GAAE,SAAW,IAAUS,IACnC,gCAASA,GADX,IAC0BC,EAAIvB,EAAKS,YAAYW,KAAKK,OAAS,EAAnC,aAI5B,KACJ,kBAAC,IAAD,CAAU3B,KAAMA,EAAMC,KAAMA,OAIhC,OAKH,IAAM2B,EAAQ","file":"component---src-templates-post-tsx-d1a138913a50677b6feb.js","sourcesContent":["import React from 'react';\nimport { Helmet } from 'react-helmet';\nimport { Link, graphql } from 'gatsby';\nimport styled from 'styled-components';\nimport { kebabCase } from 'lodash';\nimport {\n Layout,\n Wrapper,\n Header,\n Subline,\n SEO,\n PrevNext,\n SectionTitle,\n Content,\n} from '../components';\nimport config from '../../config/SiteConfig';\nimport '../utils/prismjs-theme.css';\nimport PathContext from '../models/PathContext';\nimport Post from '../models/Post';\n\nconst PostContent = styled.div`\n margin-top: 4rem;\n`;\n\ninterface Props {\n data: {\n markdownRemark: Post;\n };\n pathContext: PathContext;\n}\n\nexport default (props: Props) => {\n const { prev, next } = props.pathContext;\n const post = props.data.markdownRemark;\n\n return (\n <Layout>\n {post ? (\n <>\n <SEO postPath={post.fields.slug} postNode={post} postSEO={true} />\n <Helmet title={`${post.frontmatter.title} | ${config.siteTitle}`} />\n <Header banner={post.frontmatter.banner}>\n <Link to=\"/\">{config.siteTitle}</Link>\n <SectionTitle>{post.frontmatter.title}</SectionTitle>\n <Subline>\n {post.frontmatter.date} — {post.timeToRead} Min Read — In{' '}\n <Link to={`/categories/${kebabCase(post.frontmatter.category)}`}>\n {post.frontmatter.category}\n </Link>\n </Subline>\n </Header>\n <Wrapper>\n <Content>\n <PostContent dangerouslySetInnerHTML={{ __html: post.html }} />\n {post.frontmatter.tags ? (\n <Subline>\n Tags:  \n {post.frontmatter.tags.map((tag, i) => (\n <Link key={i} to={`/tags/${kebabCase(tag)}`}>\n <strong>{tag}</strong> {i < post.frontmatter.tags.length - 1 ? `, ` : ``}\n </Link>\n ))}\n </Subline>\n ) : null}\n <PrevNext prev={prev} next={next} />\n </Content>\n </Wrapper>\n </>\n ) : null}\n </Layout>\n );\n};\n\nexport const query = graphql`\n query($slug: String!) {\n markdownRemark(fields: { slug: { eq: $slug } }) {\n html\n excerpt(pruneLength: 250)\n fields {\n slug\n }\n frontmatter {\n title\n date(formatString: \"YYYY-MM-DD\")\n category\n tags\n banner\n }\n timeToRead\n }\n }\n`;\n"],"sourceRoot":""}