Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions content-collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const posts = defineCollection({
contributors: z.string().array().optional(),
library: libraryListSchema.optional(),
headerImage: z.string().optional(),
socialImage: z.string().optional(),
headerVideo: z.string().optional(),
headerVideoCaptions: z.string().optional(),
content: z.string(),
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/blog/introducing-tanstack-redact.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ draft: false
authors:
- Tanner Linsley
library: redact
socialImage: /blog-assets/introducing-tanstack-redact/header.jpg
---

![TanStack Redact. Your React app. Less JavaScript.](/blog-assets/introducing-tanstack-redact/header.jpg)
![TanStack Redact](/blog-assets/introducing-tanstack-redact/banner.jpg)

When I wrote [Projecting React](https://tannerlinsley.com/posts/projecting-react), I was pretty explicit about how far I wanted to take Redact. I wanted to see if a smaller implementation of the React APIs we used could work on my personal site and tanstack.com, and I was willing to keep it very specific to those two sites.

Expand Down
10 changes: 7 additions & 3 deletions src/components/markdown/MarkdownContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,13 @@ export function MarkdownContent({
</div>
</div>
) : null}
<div className="h-4" />
<div className="h-px bg-gray-500 opacity-20" />
<div className="h-4" />
{title ? (
<>
<div className="h-4" />
<div className="h-px bg-gray-500 opacity-20" />
<div className="h-4" />
</>
) : null}
<div
ref={containerRef}
className={twMerge(
Expand Down
4 changes: 3 additions & 1 deletion src/routes/blog.$.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export const Route = createFileRoute('/blog/$')({
return fetchBlogPost({ data: blogPath })
},
head: ({ loaderData }) => {
const socialImage = getBlogSocialImageUrl(loaderData?.headerImage)
const socialImage = getBlogSocialImageUrl(
loaderData?.socialImage ?? loaderData?.headerImage,
)

return getBlogPostHead(
loaderData ? { ...loaderData, socialImage } : undefined,
Expand Down
1 change: 1 addition & 0 deletions src/utils/blog.functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export const fetchBlogPost = createServerFn({ method: 'GET' })
description: post.excerpt,
filePath: `src/blog/${data}.md`,
headerImage: post.headerImage,
socialImage: post.socialImage,
isUnpublished,
headerVideo: post.headerVideo,
headerVideoCaptions: post.headerVideoCaptions,
Expand Down
Loading