Commit Graph

12 Commits

Author SHA1 Message Date
Charis a1611bf449 www: render blog posts on server (#45461)
Render blog posts on server so they are available in initial HTML
response.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
  * New collapsible sections for blog content
  * Server-side MDX compilation for blog posts
  * Improved TOC extraction producing both structured JSON and markdown

* **Refactor**
* Blog rendering converted to a server-rendered flow with unified MDX
components
  * Tag handling normalized for related-post matching

* **Bug Fixes**
* Consistent image/self-closing tag normalization and corrected TOC
indentation
  * Errors are now surfaced instead of being swallowed
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-04 10:39:42 -04:00
Charis 6c560e1adb prevent www nav bar bailing out ssr (#45422)
www pages that use DefaultLayout are bailing out of SSR because of
useSearchParams. Removing the useSearchParams opts more pages (including
the pricing page) into SSR.

_However_, it breaks the build because once blog pages are opted into
SSR, they fail due to next-mdx-remote/codehike incompatibilities. So we
also need to opt blog pages back _out_ of SSR using next/dynamic. This
reproduces previous behaviour for the blog.

Also had to remove suspense wrapper around everything because that was
causing the content div to be streamed in a hidden later chunk

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added support for the Contribute section with improved state
management integration.

* **Performance Improvements**
  * Optimized blog post rendering with client-side enhancements.
  * Improved navigation and layout loading strategies.

* **Refactor**
  * Simplified provider architecture for better maintainability.
  * Restructured internal component organization.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-30 23:19:56 +03:00
Ivan Vasilov 56de26fe22 chore: Migrate the monorepo to use Tailwind v4 (#45318)
This PR migrates the whole monorepo to use Tailwind v4:
- Removed `@tailwindcss/container-queries` plugin since it's included by
default in v4,
- Bump all instances of Tailwind to v4. Made minimal changes to the
shared config to remove non-supported features (`alpha` mentions),
- Migrate all apps to be compatible with v4 configs,
- Fix the `typography.css` import in 3 apps,
- Add missing rules which were included by default in v3,
- Run `pnpm dlx @tailwindcss/upgrade` on all apps, which renames a lot
of classes
- Rename all misnamed classes according to
https://tailwindcss.com/docs/upgrade-guide#renamed-utilities in all
apps.

---------

Co-authored-by: Jordi Enric <jordi.err@gmail.com>
2026-04-30 10:53:24 +00:00
Danny White 48b96e8a79 fix(www): use imgSocial for blog OG images (#43842)
## What kind of change does this PR introduce?

- Bug fix that resolves DEPR-396
- Additional improvements to blog post image handling

## What is the current behavior?

Blog post Open Graph metadata often prefers `imgThumb` over `imgSocial`,
so social previews on X, iMessage, and similar surfaces can render the
on-site thumbnail instead of the intended social image.

The image selection and path-normalization rules are also duplicated
across blog surfaces, which makes the precedence rules easy to drift.

## What is the new behavior?

- Centralizes blog image handling in `apps/www/lib/blog-images.ts`
- Uses `imgSocial` first, then `imgThumb`, for blog OG/Twitter metadata
- Uses `imgThumb` first, then `imgSocial`, then the placeholder, for
blog thumbnails and post hero images
- Normalizes relative blog image paths into absolute URLs for metadata
- Adds warning-only validation during content reads/builds for partial
or malformed `imgSocial` / `imgThumb` config
- Updates a few recent blog posts so `imgThumb` is a thumbnail-only
asset instead of duplicating the social image

## Additional context

- Replaces #42319 with the additional above fixes
- Added unit coverage for the shared image helper

---------

Co-authored-by: Alan Daniel <stylesshjs@gmail.com>
2026-03-19 02:45:11 +00:00
Ivan Vasilov 21d7ac0518 chore: Remove CMS code from the www app (#42648)
This PR removes all CMS code from the `www` app. This includes fetching
of blog posts, API routes for proxying blog posts and types.

All functionality should remain the same (and the number of blog posts
should be the same).

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Removed CMS integration, APIs, preview/draft/revalidate endpoints,
related env vars and dependency; switched to static markdown-only blog
pipeline.
* **Refactor**
* Simplified image and author resolution, tightened component props to
static post shapes, and migrated imports to path aliases.
* **Documentation**
  * Deleted CMS integration docs and rich-text conversion helpers.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-11 11:40:57 +01:00
Prashant Sridharan 184b288d18 Add new blog posts and a new webinar (#42260) 2026-01-29 05:14:38 +00:00
Danny White ba107edbda chore(www): clarify image paths (#41451)
## What kind of change does this PR introduce?

Frontmatter name change.

## What is the current behavior?

We repeatedly mistake `thumb` for `image` and visa versa, meaning the
wrong images are used for Open Graph and in-site thumbnails on blog
posts. Events and case studies use the same naming convention too.

## What is the new behavior?

These two bits of frontmatter are renamed for clarity:

  - Blog posts: `imgThumb` + `imgSocial`

That mapping for blog posts:

- `thumb` is now `imgThumb`
- `image` is now `imgSocial`

These related bits remain as-is:

  - Events
  - Case studies

The
[www/README.md](https://github.com/supabase/supabase/blob/dnywh/chore/blog-image-frontmatter/apps/www/README.md#best-practices)
file has been expanded to clarify all of the above. It now also provides
instructions on image optimisation.

## To test

A lot of files were touched here. Please help make sure:

- [ ] The CMS works as intended. This is the **biggest unknown**.
- [x] All blog posts render the correct image as their on-site thumbnail
and Open Graph image. You can test the latter by firing up a draft
iMessage. Online Open Graph services like Facebook cache images, so
aren’t reliable.
- [x] All events render their correct images
- [x] All case studies render their correct images
- [x] All customer stories render their correct images ([known
issue](https://supabase.slack.com/archives/C072FL5KKKP/p1768888063209359?thread_ts=1768885681.502169&cid=C072FL5KKKP),
predates this work)
2026-01-29 11:29:26 +11:00
Alan Daniel cb97fa7eb3 feat: new author page on blog (#41281)
* author page

* show authors on mobile

* fixes
2026-01-12 10:08:42 -04:00
Danny White ac95a40def chore: change terminology of prior post (#39068) 2025-10-06 10:41:28 +11:00
Raúl Barroso 4590b36a03 fix reading time for blog posts (#38600)
* fix reading time for blog posts

* fix prettier

* ran `pnpm run format`
2025-09-10 16:43:31 +02:00
Alan Daniel 4089ed660f [www]: hide blog post loaders in production deployments (#38599)
* hide loaders in production deployments

* remove empty circle

* remove loading states for live preview
2025-09-10 14:21:45 +00:00
Francesco Sansalvadore 2feda5ee19 cms www blog (#38045)
* show cms blog posts in www
* remove contentlayer from www
* outputFileTracingExcludes
* update remotePatterns
* fetch cms posts server-side with revalidation
* add cms env vars to turbo.json
* add www env vars to turbo.json
* include cms posts in www sitemap
* add migration to remove image from cms post
* update cms meta image mapping in www
2025-09-03 14:49:28 +02:00