Commit graph

8 commits

Author SHA1 Message Date
Tito
95e33c4dd2
Fix: slug type issue (#54616)
Failure at build time because - Type error: Argument of type 'string | null' is not assignable to parameter of type 'string'.
2023-09-04 00:23:38 +00:00
Lee Robinson
0718aec93b
Update Contentful example for App Router. (#54205)
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/
2023-08-21 13:21:37 +00:00
David Fateh
3861e4b8ec
Adding Asset Component for Rich Text Renderer (#32503)
This PR accomplishes 2 things:

1. You can now add images to the rich text post of the example and see those images show up in the app. This is a good jumping off point for people who are learning how to customize the rich text renderers by adding custom components to the mapper.
2. Updating the README pictures to have a more up-to-date UI in the screenshots.

## Feature
- [x] Documentation added

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-01-07 22:51:39 +00:00
Lee Robinson
279e105279
Update .now.sh to .vercel.app. (#22359) 2021-04-14 09:46:06 -05:00
Ante Sepic
3f4872aa67
[Examples] Switch contentful example to graphql (#15223)
Now that all Contentful spaces support GraphQL, we are looking into switching the example from using a JS library to a simple fetch with GraphQL.

@stefanjudis ☝️
2020-11-07 00:51:59 +00:00
Luis Alvarez D
2cd691050a
Add new import flow to CMS examples (#14053)
[ch2502]

- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples
2020-06-11 23:44:23 +00:00
Joe Haddad
86160a5190
Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
Luis Alvarez D
1a7a14e5e2
[Examples] add Contentful example (#12323)
* Added example

* Readme fixes

* Preview mode fix

* Added rich test post content

* Added demo

* Apply suggestions from code review

* Update examples/cms-contentful/README.md

* Apply suggestions from code review

* Apply suggestions from code review

* Now → Vercel

Co-authored-by: Shu Uesugi <shu@chibicode.com>
2020-04-29 13:19:49 -05:00