Skip to content

Support images in Assembly page body content#78

Merged
russelltrow merged 1 commit into
mainfrom
claude/notion-images-display-9cjv28
Jul 1, 2026
Merged

Support images in Assembly page body content#78
russelltrow merged 1 commit into
mainfrom
claude/notion-images-display-9cjv28

Conversation

@russelltrow

Copy link
Copy Markdown
Member

Summary

Fixed a bug where images embedded in an Assembly's Notion page body were being silently dropped during the fetch process. Images are now downloaded and rehosted to public/assets/assembly-images/ (since Notion's file URLs expire after ~1 hour) and rendered as <img> or <figure> elements in the detailsHtml field.

Changes

  • blockToHtml() function — added image case to handle both external and Notion-hosted file URLs; made the function async to support asynchronous file downloads
  • Image handling — downloads images via the existing downloadFile() helper, emits <img> tags with lazy loading, wraps in <figure>/<figcaption> when captions are present
  • New asset directorypublic/assets/assembly-images/ created and gitignored alongside other Notion-fetched asset directories
  • Call site update — changed blocks.map(blockToHtml) to await Promise.all(blocks.map(blockToHtml)) in fetchAssemblies() to handle async block conversion
  • Documentation — updated docs/notion.md and docs/pages/assemblies.md to document image support and note which block types remain unsupported (video, embed, callout, table, etc.)
  • DEVLOG entry — documented the bug, fix, and next steps

Implementation Details

  • Images are downloaded using the same pattern as member logos, team photos, and project icons
  • Alt text is properly escaped for HTML attributes
  • Captions are preserved as <figcaption> when present
  • Unsupported block types continue to silently drop (as before)

https://claude.ai/code/session_018GKoRr67ykTcYco527HKoL

blockToHtml() in the Notion fetch script had no case for "image"
blocks, so any image placed in an assembly's Notion page body was
silently dropped before it ever reached assemblies.json. Add image
support: download/rehost to public/assets/assembly-images/ (mirroring
the existing logo/photo/icon pattern) and emit <img>/<figure> markup.
@netlify

netlify Bot commented Jul 1, 2026

Copy link
Copy Markdown

Deploy Preview for green-software-foundation ready!

Name Link
🔨 Latest commit f75c609
🔍 Latest deploy log https://app.netlify.com/projects/green-software-foundation/deploys/6a451c563387d600086eb8b7
😎 Deploy Preview https://deploy-preview-78--green-software-foundation.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 88 (🟢 up 2 from production)
Accessibility: 93 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@russelltrow russelltrow merged commit 1ea423d into main Jul 1, 2026
5 of 6 checks passed
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.

2 participants