import tinytime from 'tinytime' import Link from '@/components/Link' import SectionContainer from '@/components/SectionContainer' import PageTitle from '@/components/PageTitle' import BlogSeo from '@/components/BlogSeo' import Tag from '@/components/Tag' import siteMetdata from '@/data/siteMetadata' const editUrl = (fileName) => `${siteMetdata.siteRepo}/blob/master/data/blog/${fileName}` const discussUrl = (slug) => `https://mobile.twitter.com/search?q=${encodeURIComponent(`${siteMetdata.siteUrl}/blog/${slug}`)}` const postDateTemplate = tinytime('{dddd}, {MMMM} {DD}, {YYYY}') export default function PostLayout({ children, frontMatter, next, prev }) { const { slug, fileName, date, title, tags } = frontMatter return (
Published on
{title}
Authors
  • avatar
    Name
    {siteMetdata.author}
    Twitter
    {siteMetdata.twitter.replace('https://twitter.com/', '@')}
{children}
{'Discuss on Twitter'} {` • `} {'View on GitHub'}
) }