/** @jsx jsx */ import { Link } from 'gatsby' import _ from 'lodash/fp' import { Box, Flex, Heading, jsx, Text } from 'theme-ui' import { useSiteMetadata } from '../hooks' import Layout from './layout' import PostList from './post-list' import SEO from "./seo" import Tags from './tags' const rootPath = `${__PATH_PREFIX__}/` export const Post = ({ id, date, title, category, tags, excerpt, slug }) => { return ( { date } { title } { excerpt } ) } const PaginationLink = ({ url, children }) => { if (!url) return
return ( { children } ) } export default ({ data, location, pageContext }) => { const { author } = useSiteMetadata() const posts = data.allOrgPost.nodes const category = location.pathname.replace(new RegExp(`^${rootPath}`), '') const keywords = _.flow( _.reduce((all, p) => [...all, p.category, ...(p.tags || [])], []), _.uniq, _.compact, )(posts) const { next, prev, columns } = pageContext return (
{ category && category.length > 0 && isNaN(category) && ( { category } )}
◄ more recent posts older posts ►
) }