feat: feed feature, typescript, remove google, fix errs & warns
publish / Build-and-publish (push) Successful in 13m32s

This commit is contained in:
Unknown
2026-07-17 22:22:29 +01:00
parent 2c42ecae5f
commit 8a10d127c1
55 changed files with 1887 additions and 587 deletions
+71
View File
@@ -0,0 +1,71 @@
import * as React from 'react'
import { graphql, PageProps } from 'gatsby'
import Layout from '../components/layout'
import Seo from '../components/seo'
import { Section } from '../components/shared'
import Post from './post'
import { SideBar } from './sidebar'
import type { PostNode, PageContext } from '../types'
const FeedPostTemplate: React.FC<
PageProps<{ post: PostNode }, PageContext>
> = ({ data, location, pageContext }) => {
const { post } = data
const { previewImg } = post.frontmatter
return (
<Layout location={location} heroSection={false}>
<Seo
title={post.frontmatter.title}
description={post.frontmatter.description}
previewImg={
previewImg?.childImageSharp?.gatsbyImageData?.images?.fallback?.src
}
/>
<Section color="black" bgColor="white" bottomArrow={false}>
<div className="row">
<div className="col-md-7">
<Post post={post} location={location} />
</div>
<div className="col-md-5">
<SideBar
pageContext={pageContext}
location={location}
basePath="/feed"
/>
</div>
</div>
</Section>
</Layout>
)
}
export default FeedPostTemplate
export const pageQuery = graphql`
query FeedPostByPath($id: String!) {
post: markdownRemark(id: { eq: $id }) {
id
html
fields {
slug
}
frontmatter {
title
description
date(formatString: "MMMM DD, YYYY")
author
authorLink
previewImg {
childImageSharp {
gatsbyImageData(layout: CONSTRAINED)
}
}
tags
}
}
}
`