Skip to content

feat: Display author photos and bios from Notion#129

Merged
vibemarketerpromax merged 5 commits intomainfrom
feat/blog-author-bios
Feb 25, 2026
Merged

feat: Display author photos and bios from Notion#129
vibemarketerpromax merged 5 commits intomainfrom
feat/blog-author-bios

Conversation

@vibemarketerpromax
Copy link
Collaborator

Summary

  • Fetches Author image file property from Notion blog database and caches photos locally (same pattern as blog cover images — handles expiring S3 URLs)
  • New AuthorAvatar component renders real photo via next/image with gradient-initial fallback
  • Hero section: author photo + name only (no title/bio per request)
  • Bottom of article: full BlogAuthorBio with photo, name, title, bio, and social links

Changes

  • lib/notion-image-cache.ts — new cacheAuthorPhoto() function, saves to public/content/cache/authors/
  • lib/notion-blog.ts — extracts Author image property, caches it, passes to mapAuthor()
  • components/blog/BlogAuthorBio.tsx — new AuthorAvatar component, used in both hero and bio sections
  • app/blogs/[slug]/page.tsx — hero uses AuthorAvatar instead of hardcoded gradient circle

Test plan

  • Blog posts with author photos in Notion show the actual photo
  • Blog posts without author photos show the gradient initial fallback
  • Author photo appears small (40px) in hero, large (80px) in bottom bio
  • Hero shows name only; bottom bio shows name + title + bio
  • Cached images persist in public/content/cache/authors/
  • Build passes with NOTION_TOKEN set

- Add cacheAuthorPhoto() to download and cache author images from Notion
  (same pattern as blog cover caching — handles temporary S3 URLs)
- Extract "Author image" file property from Notion database
- Create reusable AuthorAvatar component with next/image and gradient
  initial fallback when no photo exists
- Hero section: show author photo + name (no title/bio)
- Bottom section: show full author bio with photo, name, title, and
  social links via BlogAuthorBio component
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 25, 2026

Deploying website with  Cloudflare Pages  Cloudflare Pages

Latest commit: ceff60f
Status: ✅  Deploy successful!
Preview URL: https://778414c5.website-yiq.pages.dev
Branch Preview URL: https://feat-blog-author-bios.website-yiq.pages.dev

View logs

The m.div with whileInView animation started at opacity: 0 but the
intersection observer never fired inside the TracingBeam container,
making the entire author bio section invisible. Replaced with a plain
div. Also removes the unnecessary "use client" directive since the
component no longer uses any client-side APIs.
- AuthorAvatar: wrap Image in div with overflow-hidden for reliable
  circular clipping in both hero and bio sections
- notion-image-cache: detect HEIC/HEIF/TIFF files and convert to JPEG
  via sharp during build (fixes Shravani's .heic author photo)
- tracing-beam: remove h-full from outer container which caused it to
  stretch beyond content height in the grid layout, creating blank space
  between article end and "Continue Reading" section
BlogRelatedPosts, BlogCTA, and BlogPostCard used framer-motion's lazy
`m` component which requires a `LazyMotion` provider ancestor. The blog
post page is a server component with no such provider, so `whileInView`
never fired and elements stayed at initial opacity: 0.

- BlogRelatedPosts: removed framer-motion animation entirely
- BlogCTA: removed framer-motion animation entirely
- BlogPostCard: switched from `m` to `motion` (works without LazyMotion)
Use consistent py-16 sm:py-24 for Related Posts and CTA sections,
matching the standard pattern used across all other site sections.
Remove redundant internal spacing from BlogRelatedPosts.
@vibemarketerpromax vibemarketerpromax merged commit a3762af into main Feb 25, 2026
5 checks passed
@vibemarketerpromax vibemarketerpromax deleted the feat/blog-author-bios branch February 25, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant