Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Contentful example for App Router. #54205

Merged
merged 5 commits into from
Aug 21, 2023
Merged

Conversation

leerob
Copy link
Member

@leerob leerob commented Aug 18, 2023

This PR updates the cms-contentful example to use:

  • App Router
  • TypeScript
  • Draft Mode (previously Preview Mode)
  • ISR / Data Cache (revalidations through revalidateTag)

Further, it combines many separate files into more manageable single files, and tries to better bucket provider-specific logic into the lib/ folder. I'm hoping this can be the foundation for re-writing the rest of the cms-* examples to use App Router.

Overall, the code is much easier to reason about IMO. Pretty happy with the change. I sprinkled some any's throughout here, but if someone wants to make it better, go for it!

https://app-router-contentful.vercel.app/

@leerob leerob requested review from timneutkens, ijjk, shuding, styfle, huozhi and a team as code owners August 18, 2023 02:37
@leerob leerob requested review from molebox and steven-tey August 18, 2023 02:37
@ijjk ijjk added examples Issue was opened via the examples template. created-by: Next.js Docs team PRs by the Docs team. labels Aug 18, 2023
Co-authored-by: Steven <steven@ceriously.com>
Copy link

@orca-security-us orca-security-us bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
passed Passed Secrets high 0  medium 0  low 0  info 0

@kodiakhq kodiakhq bot merged commit 0718aec into canary Aug 21, 2023
@kodiakhq kodiakhq bot deleted the cms-contentful-app-router branch August 21, 2023 13:21
@github-actions github-actions bot added the locked label Sep 5, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
created-by: Next.js Docs team PRs by the Docs team. examples Issue was opened via the examples template. locked
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants