Skip to content

fix: restore Substack fetch + conditional iframe fallback - #5

Merged
Korede-TA merged 1 commit into
mainfrom
fix/restore-substack-fetch
Jun 3, 2026
Merged

fix: restore Substack fetch + conditional iframe fallback#5
Korede-TA merged 1 commit into
mainfrom
fix/restore-substack-fetch

Conversation

@Korede-TA

Copy link
Copy Markdown
Contributor

This commit was accidentally left off the squash merge of PR #4 (it was pushed to the branch after the merge happened).

What

  • Restores getSubstackEssays call in getStaticProps — fetch is attempted at build time, returns [] gracefully if blocked by Cloudflare
  • Local Notion posts and Substack posts are merged into one sorted list
  • Substack embed iframe only renders when substackEssays is empty (fallback), not unconditionally
  • substackEssays and SubstackEssay type threaded back through IndexPageProps and HomePageContentProps

Behaviour

Scenario What shows
Substack fetch succeeds Local posts + Substack posts merged, no iframe
Substack fetch blocked (Cloudflare/CI) Local posts only + iframe embed as fallback
No local posts either Just the iframe embed

"Read on Substack ↗" link is always visible regardless.

https://claude.ai/code/session_01P9Bn6gkWtM15yEzGf79XCQ


Generated by Claude Code

…fallback

getStaticProps now attempts getSubstackEssays again (returns [] gracefully
if blocked by Cloudflare). Local Notion posts and Substack posts are merged
into one sorted list. The embed iframe only shows when substackEssays is
empty, acting as a fallback rather than always rendering.

https://claude.ai/code/session_01P9Bn6gkWtM15yEzGf79XCQ
@netlify

netlify Bot commented Jun 3, 2026

Copy link
Copy Markdown

Deploy Preview for soft-swan-5d0ce7 failed. Why did it fail? →

Name Link
🔨 Latest commit c3280c0
🔍 Latest deploy log https://app.netlify.com/projects/soft-swan-5d0ce7/deploys/6a1f7db8926ee30008d8334e

@netlify

netlify Bot commented Jun 3, 2026

Copy link
Copy Markdown

Deploy Preview for darling-dusk-441006 ready!

Name Link
🔨 Latest commit c3280c0
🔍 Latest deploy log https://app.netlify.com/projects/darling-dusk-441006/deploys/6a1f7db8b823090008d1f04e
😎 Deploy Preview https://deploy-preview-5--darling-dusk-441006.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-06-03 01:13 UTC

@Korede-TA
Korede-TA merged commit e815d58 into main Jun 3, 2026
5 of 9 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