Skip to content

feat: add blog content and update preview logic#4946

Open
americano98 wants to merge 9 commits into
neondatabase:mainfrom
americano98:keep-blog-files-in-repo-neondatabase
Open

feat: add blog content and update preview logic#4946
americano98 wants to merge 9 commits into
neondatabase:mainfrom
americano98:keep-blog-files-in-repo-neondatabase

Conversation

@americano98
Copy link
Copy Markdown
Contributor

Summary

This PR moves published blog markdown into the website repository and makes content/blog the canonical source for production blog content. Normal blog pages now read markdown from the local filesystem instead of the external blog-content repo or CDN. Media assets remain on the CDN and are referenced by URL from markdown frontmatter/content.

Full preview index/category snapshots load from the actual GitHub branch tree at the resolved commit. The loader reads the recursive Git tree, selects only content/blog authors/categories/posts, and fetches file text in parallel GraphQL blob batches. This avoids per-post REST Contents API fan-out, avoids GitHub compare file-list caps, and keeps preview content faithful to the selected branch even when it is behind main. Preview routes also set a longer function duration for cold full-branch loads. Single-post preview remains scoped to the requested markdown file.

The PR also adds a Sync Main GitHub Actions workflow intended for the private mirror repository. The workflow can keep the mirror main aligned with the public upstream main while leaving author branches untouched.

Notes

  • content/blog/posts, content/blog/authors, and content/blog/categories are now committed to this repo.
  • The old CDN/blog-content markdown source is removed from the runtime path.
  • Preview mode does not use a preview secret; access is controlled by environment configuration and the private repo token.
  • The mirror sync workflow assumes the upstream repository is publicly readable.

Validation

@americano98 americano98 requested a review from danieltprice as a code owner May 21, 2026 14:56
@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

@americano98 is attempting to deploy a commit to the neondatabase Team on Vercel.

A member of the Team first needs to authorize it.

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