{"version":3,"sources":["webpack://gatsby-starter-ghost/./src/templates/tag.js"],"names":["data","location","pageContext","tag","ghostTag","posts","allGhostPost","edges","type","className","name","description","map","node","key","id","post"],"mappings":"yKAyDA,UA5CY,SAAC,GAAqC,IAAnCA,EAAkC,EAAlCA,KAAMC,EAA4B,EAA5BA,SAAUC,EAAkB,EAAlBA,YACrBC,EAAMH,EAAKI,SACXC,EAAQL,EAAKM,aAAaC,MAEhC,OACI,gCACI,gBAAC,IAAD,CACIP,KAAMA,EACNC,SAAUA,EACVO,KAAK,WAET,gBAAC,KAAD,KACI,uBAAKC,UAAU,aACX,0BAAQA,UAAU,cACd,0BAAKN,EAAIO,MACRP,EAAIQ,YAAc,yBAAIR,EAAIQ,aAAmB,MAElD,2BAASF,UAAU,aACdJ,EAAMO,KAAI,gBAAGC,EAAH,EAAGA,KAAH,OAEP,gBAAC,KAAD,CAAUC,IAAKD,EAAKE,GAAIC,KAAMH,QAGtC,gBAAC,KAAD,CAAYX,YAAaA","file":"component---src-templates-tag-js-4fa91a0c8b80b0a1410a.js","sourcesContent":["import React from 'react'\nimport PropTypes from 'prop-types'\nimport { graphql } from 'gatsby'\n\nimport { Layout, PostCard, Pagination } from '../components/common'\nimport { MetaData } from '../components/common/meta'\n\n/**\n* Tag page (/tag/:slug)\n*\n* Loads all posts for the requested tag incl. pagination.\n*\n*/\nconst Tag = ({ data, location, pageContext }) => {\n const tag = data.ghostTag\n const posts = data.allGhostPost.edges\n\n return (\n <>\n \n \n
\n
\n

{tag.name}

\n {tag.description ?

{tag.description}

: null }\n
\n
\n {posts.map(({ node }) => (\n // The tag below includes the markup for each post - components/common/PostCard.js\n \n ))}\n
\n \n
\n
\n \n )\n}\n\nTag.propTypes = {\n data: PropTypes.shape({\n ghostTag: PropTypes.shape({\n name: PropTypes.string.isRequired,\n description: PropTypes.string,\n }),\n allGhostPost: PropTypes.object.isRequired,\n }).isRequired,\n location: PropTypes.shape({\n pathname: PropTypes.string.isRequired,\n }).isRequired,\n pageContext: PropTypes.object,\n}\n\nexport default Tag\n\nexport const pageQuery = graphql`\n query GhostTagQuery($slug: String!, $limit: Int!, $skip: Int!) {\n ghostTag(slug: { eq: $slug }) {\n ...GhostTagFields\n }\n allGhostPost(\n sort: { order: DESC, fields: [published_at] },\n filter: {tags: {elemMatch: {slug: {eq: $slug}}}},\n limit: $limit,\n skip: $skip\n ) {\n edges {\n node {\n ...GhostPostFields\n }\n }\n }\n }\n`\n"],"sourceRoot":""}