Skip to content

Commit 81b9edf

Browse files
ALRubingerTania Chakrabortytaniacryptid
authored
Developer Spotlight: Hampton (#28)
* Developer Spotlight: Hampton * Add OG image for Hampton dev spotlight blog post * Use ogImage in blog listing when available Prefer ogImage over image in BlogSection component, matching the behavior of the blog post detail page. This allows blog posts with custom OG images (1200x630) to display them in the listing page instead of the square images (1200x1200). Follows the same pattern established in PR #25 for the detail page. * Typo and grammar fixes * Update publish date * Minor changes towards end. * Add date prefixes to blog post filenames for better organization - Renamed all blog posts to include YYYY-MM-DD prefix - Improves chronological sorting in file explorer - URLs remain unchanged (controlled by slug field) - Makes it easier for writers to see post dates at a glance --------- Co-authored-by: Tania Chakraborty <tchakraborty@block.xyz> Co-authored-by: Tania <126204004+taniacryptid@users.noreply.github.com>
1 parent ac7ad57 commit 81b9edf

16 files changed

+139
-2
lines changed

src/assets/blog/hampton-og.png

548 KB
Loading

src/assets/blog/hampton.jpg

875 KB
Loading

src/components/blog/BlogSection.astro

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ interface BlogPost {
1818
date: string;
1919
excerpt: string;
2020
image?: string;
21+
ogImage?: string;
2122
tags?: string[];
2223
readTime?: string;
2324
}
@@ -99,15 +100,15 @@ const getAuthorName = (authorId: string) => {
99100
layout === 'list' ? 'flex-row items-center md:flex-col' :
100101
layout === 'featured' && index === 0 ? 'col-span-full flex-row items-center p-8 md:flex-col md:p-6' : ''
101102
}`}>
102-
{post.data.image && (
103+
{(post.data.ogImage || post.data.image) && (
103104
<div class={`relative overflow-hidden ${
104105
layout === 'grid' || (layout === 'featured' && index !== 0) ? 'aspect-video' :
105106
layout === 'list' || (layout === 'featured' && index === 0) ? 'w-80 h-48 flex-shrink-0 md:w-full md:h-48' :
106107
layout === 'modern' ? 'aspect-video' : ''
107108
}`}>
108109
<a href={getPostURL(post)}>
109110
<Image
110-
src={images[imagePath + post.data.image]()}
111+
src={images[imagePath + (post.data.ogImage || post.data.image)]()}
111112
alt={post.data.title}
112113
width={800}
113114
height={600}
File renamed without changes.

src/content/blog/posts/introducing-block-open-source.mdx renamed to src/content/blog/posts/2025-01-21-introducing-block-open-source.mdx

File renamed without changes.
File renamed without changes.

src/content/blog/posts/nvidia-gb200-deployment.mdx renamed to src/content/blog/posts/2025-03-12-nvidia-gb200-deployment.mdx

File renamed without changes.
File renamed without changes.

src/content/blog/posts/bitcoin-treasury-tools.mdx renamed to src/content/blog/posts/2025-04-09-bitcoin-treasury-tools.mdx

File renamed without changes.

src/content/blog/posts/block-joins-kotlin-foundation.mdx renamed to src/content/blog/posts/2025-05-22-block-joins-kotlin-foundation.mdx

File renamed without changes.

0 commit comments

Comments
 (0)