Commit graph

13 commits

Author SHA1 Message Date
Steven
4466ba436b
chore(examples): use default prettier for examples/templates (#60530)
## Description
This PR ensures that the default prettier config is used for examples
and templates.

This config is compatible with `prettier@3` as well (upgrading prettier
is bigger change that can be a future PR).

## Changes
- Updated `.prettierrc.json` in root with `"trailingComma": "es5"` (will
be needed upgrading to prettier@3)
- Added `examples/.prettierrc.json` with default config (this will
change every example)
- Added `packages/create-next-app/templates/.prettierrc.json` with
default config (this will change every template)

## Related

- Fixes #54402
- Closes #54409
2024-01-11 16:01:44 -07:00
Steven
68b51415ec
chore: update examples to use draft mode (#49720)
This PR updates the examples to use Draft Mode introduced in [Next.js 13.4](https://nextjs.org/blog/next-13-4)

fix NEXT-1153
2023-05-13 07:12:56 +00:00
Nick Anisimov
cd557c9667
fix(cms-examples): title warning (#46262)
## Bug

- [x] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

Fixes #46261
2023-02-23 15:21:03 +00:00
Henrik Wenz
64a3697d05
[Docs] Update examples to favour functional _document (#39871)
## Changes

- Migrate class based `_document`s to functional documents 
- Removed `_document.js` where default
- Removed `MyDocument.getInitialProps` where default

## Motivation

This removes some boilerplate and prepares examples for server components.

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-08-23 18:52:31 +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
Greg Rickaby
58c7265ba0
Update DatoCMS Example (#13008)
👋🏻 This PR updates the Datocms example:

- [x] Next.js 9.4 absolute import and aliases support
- [x] Next.js 9.4 native `.env` support
- [x] Tailwind 1.4 native PurgeCSS support
- [x] Chore: bump other dependencies, like React, Remark, and DateFNS 

I've tested this PR here: 

- 💻 https://github.com/gregrickaby/datocms-next-js-blog-demo-2392
- 👀 https://datocms-next-js-blog-demo-2392.now.sh/
2020-05-19 23:13:35 +00:00
Joe Haddad
dbad9db68c
Update Examples for Fast Refresh (#13068) 2020-05-18 17:44:18 -04:00
Joe Haddad
86160a5190
Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
Joe Haddad
b41f9baaa4
Fix up CMS examples (#12840) 2020-05-13 14:13:14 -04:00
Yuji Matsumoto
67fd72b764
Fix preview-mode docs/examples typo (#11345)
be know => be known
2020-03-25 18:13:33 +01:00
Joe Haddad
39ed664966
Fix Lint 2020-03-12 09:09:12 -04:00
Brad Larson
3b5029fb92
cms-datocms SerializableError fixes (#10986) 2020-03-12 13:07:57 +01:00
Shu Uesugi
bf0ea49b02
DatoCMS Example (#10891)
* Copy cms-datocms

* Update package.json

* Desktop design

* Tablet support

* Mobile styles

* Update titles

* Add article page

* Minor tweaks

* Fix height issue

* Improve text colors

* Extract Alert and Footer components

* Extract avatar

* Add Date

* Extract container

* Fix capitalization

* Make it work with no backend

* Add paragraph styles

* Extract PostPreview

* Extract h2

* Extract more stories

* Refactor into more components

* Update tags

* Add missing key

* Add custom document for lang="" support

* Add dotenv

* Load data for the index page

* Limit posts

* Show post page

* Add markdown processing

* Forgot margin

* Add links

* Remove files and add fallback

* Add og:image

* Add favicon

* Add aria-label

* Fix prerender

* Learn more → read documentation

* Fix links and footer

* Desaturate using imgix

* Add preview secret

* Add preview support

* Fix preview code

* Exit preview mode

* Extract getAllPostsWithSlug

* Extract getAllPostsForHome

* Extract getPreviewPostBySlug

* Extract getPostAndMorePosts

* Extract constants

* Extract markdownToHtml

* Fix markdown styles

* Fix imgix for author

* Add README

* Add links to docs
2020-03-09 11:51:08 +01:00