Commit 534211ba authored by Cursor Agent's avatar Cursor Agent

Fix basic-features documentation links in examples

Update all references from deprecated /docs/basic-features/* paths to current locations:
- Pages and layouts, static generation, server-side rendering
- Data fetching, getStaticProps, getStaticPaths
- ESLint, CSS support, static file serving
Co-authored-by: 's avatarismael <ismael@vercel.com>
parent d67b5dae
......@@ -2,7 +2,7 @@
[Apollo](https://www.apollographql.com/client/) is a GraphQL client that allows you to easily query the exact data you need from a GraphQL server. In addition to fetching and mutating data, Apollo analyzes your queries and their results to construct a client-side cache of your data, which is kept up to date as further queries and mutations are run. The integration with Next and Apollo Server is implemented using the [apollo-server-integration-next](https://github.com/apollo-server-integrations/apollo-server-integration-next) community package.
In this simple example, we integrate Apollo seamlessly with [Next.js data fetching methods](https://nextjs.org/docs/basic-features/data-fetching) to fetch queries in the server and hydrate them in the browser.
In this simple example, we integrate Apollo seamlessly with [Next.js data fetching methods](https://nextjs.org/docs/pages/building-your-application/data-fetching) to fetch queries in the server and hydrate them in the browser.
## Deploy your own
......
......@@ -2,7 +2,7 @@
[Apollo](https://www.apollographql.com/client/) is a GraphQL client that allows you to easily query the exact data you need from a GraphQL server. In addition to fetching and mutating data, Apollo analyzes your queries and their results to construct a client-side cache of your data, which is kept up to date as further queries and mutations are run. The integration with Next and Apollo Server is implemented using the [apollo-server-integration-next](https://github.com/apollo-server-integrations/apollo-server-integration-next) community package.
In this simple example, we integrate Apollo seamlessly with [Next.js data fetching methods](https://nextjs.org/docs/basic-features/data-fetching) to fetch queries in the server and hydrate them in the browser.
In this simple example, we integrate Apollo seamlessly with [Next.js data fetching methods](https://nextjs.org/docs/pages/building-your-application/data-fetching) to fetch queries in the server and hydrate them in the browser.
## Deploy your own
......
# Consume local Apollo GraphQL schema to create Static Generation export
Next.js ships with two forms of pre-rendering: [Static Generation](https://nextjs.org/docs/basic-features/pages#static-generation-recommended) and [Server-side Rendering](https://nextjs.org/docs/basic-features/pages#server-side-rendering). This example shows how to perform Static Generation using a local [Apollo GraphQL Server ](https://www.apollographql.com/docs/apollo-server/) schema within [getStaticProps](https://nextjs.org/docs/basic-features/data-fetching/get-static-props) and [getStaticPaths](https://nextjs.org/docs/pages/building-your-application/data-fetching/get-static-paths). The end result is a Next.js application that uses one Apollo GraphQL schema to generate static pages at build time and also serve a GraphQL [API Route](https://nextjs.org/docs/pages/building-your-application/routing/api-routes) at runtime. The integration with Next and Apollo Server is implemented using the [apollo-server-integration-next](https://github.com/apollo-server-integrations/apollo-server-integration-next) community package.
Next.js ships with two forms of pre-rendering: [Static Generation](https://nextjs.org/docs/pages/building-your-application/rendering/static-site-generation) and [Server-side Rendering](https://nextjs.org/docs/pages/building-your-application/rendering/server-side-rendering). This example shows how to perform Static Generation using a local [Apollo GraphQL Server ](https://www.apollographql.com/docs/apollo-server/) schema within [getStaticProps](https://nextjs.org/docs/pages/building-your-application/data-fetching/get-static-props) and [getStaticPaths](https://nextjs.org/docs/pages/building-your-application/data-fetching/get-static-paths). The end result is a Next.js application that uses one Apollo GraphQL schema to generate static pages at build time and also serve a GraphQL [API Route](https://nextjs.org/docs/pages/building-your-application/routing/api-routes) at runtime. The integration with Next and Apollo Server is implemented using the [apollo-server-integration-next](https://github.com/apollo-server-integrations/apollo-server-integration-next) community package.
## Deploy your own
......@@ -30,4 +30,4 @@ Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&ut
If you wish to export a static HTML + JS version of the site you need to first change the setting in this example in `./pages/[username].js` where `getStaticPaths` has `fallback: true` - this needs to be `false` for static export to work. You can then run `npm run build` and `npm run export` to export the site as a static folder in `./out` directory.
[Read more about fallback option](https://nextjs.org/docs/basic-features/data-fetching#the-fallback-key-required)
[Read more about fallback option](https://nextjs.org/docs/pages/building-your-application/data-fetching/get-static-paths)
# Basic CSS example
Next.js has built-in support for [CSS Modules](https://nextjs.org/docs/basic-features/built-in-css-support#adding-component-level-css) allowing you to write scoped CSS by automatically creating a unique class name. CSS Module files can be imported anywhere in your application and you don't have to worry about collisions.
Next.js has built-in support for [CSS Modules](https://nextjs.org/docs/pages/getting-started/css) allowing you to write scoped CSS by automatically creating a unique class name. CSS Module files can be imported anywhere in your application and you don't have to worry about collisions.
## Deploy your own
......
# A statically generated blog example using Next.js and Agility CMS
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/basic-features/pages) feature using [Agility CMS](https://www.agilitycms.com) as the data source.
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts) feature using [Agility CMS](https://www.agilitycms.com) as the data source.
> `IMPORTANT` - This example uses Agility CMS's [**Page Management**](https://agilitycms.com/resources/posts/page-management-in-agility-cms-vs-other-headless-cmss) features. This means that the CMS ultimately drives what pages are available and what content is on each page. This enables **Editors** to focus on managing their pages, while allowing you, (the **Developer**) to focus on building UI components for the editors to compose their pages.
......
# A statically generated blog example using Next.js and Builder.io
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/basic-features/pages) feature using [Builder.io](https://builder.io/) as the data source.
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts) feature using [Builder.io](https://builder.io/) as the data source.
## Demo
......
......@@ -4,7 +4,7 @@ This Next.js starter project fully integrates with dynamic sample content from y
A copy of this starter project can be easily and quickly deployed to Vercel with the click of a button.
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/basic-features/pages) feature using [ButterCMS](https://buttercms.com/) as the data source.
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts) feature using [ButterCMS](https://buttercms.com/) as the data source.
## Demo
......
# A statically generated blog example using Next.js and Contentful
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/basic-features/pages) feature using [Contentful](https://www.contentful.com/) as the data source.
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts) feature using [Contentful](https://www.contentful.com/) as the data source.
## Demo
......
# A statically generated blog example using Next.js and Cosmic
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/basic-features/pages) feature using [Cosmic](https://cosmicjs.com/) as the data source.
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts) feature using [Cosmic](https://cosmicjs.com/) as the data source.
## Demo
......
# A statically generated blog example using Next.js and DatoCMS
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/basic-features/pages) feature using [DatoCMS](https://www.datocms.com/) as the data source.
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts) feature using [DatoCMS](https://www.datocms.com/) as the data source.
## Demo
......
# A statically generated blog example using Next.js and dotCMS
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/basic-features/pages) feature using [dotCMS](https://dotcms.com/) as the data source.
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts) feature using [dotCMS](https://dotcms.com/) as the data source.
## Demo
......
# A statically generated blog example using Next.js and Drupal
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/basic-features/pages) feature using [Drupal](https://drupal.org/project/next) as the data source.
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts) feature using [Drupal](https://drupal.org/project/next) as the data source.
## Demo
......
# A statically generated blog example using Next.js and Enterspeed
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/basic-features/pages) feature using [Enterspeed](https://www.enterspeed.com/) as the data source.
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts) feature using [Enterspeed](https://www.enterspeed.com/) as the data source.
## Demo
......
# A statically generated blog example using Next.js and Ghost
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/basic-features/pages) feature using [Ghost](https://ghost.org/) as the data source.
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts) feature using [Ghost](https://ghost.org/) as the data source.
> This boilerplate demonstrates simple usage and best practices. If you are looking for a more feature rich Next.js generator for Ghost including the Casper theme,
> check out [next-cms-ghost](https://github.com/styxlab/next-cms-ghost).
......
# A statically generated blog example using Next.js and GraphCMS
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/basic-features/pages) feature using [GraphCMS](https://www.graphcms.com/) as the data source.
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts) feature using [GraphCMS](https://www.graphcms.com/) as the data source.
## Demo
......
# A statically generated blog example using Next.js and Kontent.ai
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/basic-features/pages) feature using [Kontent.ai](https://kontent.ai) as the data source.
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts) feature using [Kontent.ai](https://kontent.ai) as the data source.
## Demo
......
# A statically generated landing page using Next.js and Plasmic
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/basic-features/pages) feature using [Plasmic](https://www.plasmic.app/) as the visual page builder.
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts) feature using [Plasmic](https://www.plasmic.app/) as the visual page builder.
You'll get:
......
# A statically generated blog example using Next.js and Prepr
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/basic-features/pages) feature using [Prepr](https://prepr.io/) as the data source.
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts) feature using [Prepr](https://prepr.io/) as the data source.
## Demo
......
# A statically generated blog example using Next.js and Prismic
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/basic-features/pages) feature using [Prismic](https://prismic.io/) as the data source.
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts) feature using [Prismic](https://prismic.io/) as the data source.
## Demo
......
# A statically generated blog example using Next.js and Sitefinity CMS
This is the existing [cms-sitefinity](https://github.com/vercel/next.js/tree/canary/examples/cms-sitefinity) plus TypeScript.
This example showcases [Next.js's Static Generation feature](https://nextjs.org/docs/basic-features/pages) using Sitefinity CMS as the data source.
This example showcases [Next.js's Static Generation feature](https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts) using Sitefinity CMS as the data source.
## Demo
......
# A statically generated blog example using Next.js and Storyblok
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/basic-features/pages) feature using [Storyblok](https://www.storyblok.com/) as the data source.
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts) feature using [Storyblok](https://www.storyblok.com/) as the data source.
## Demo
......
# A statically generated blog example using Next.js and TakeShape
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/basic-features/pages) feature using [TakeShape](https://www.takeshape.io/) as the data source.
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts) feature using [TakeShape](https://www.takeshape.io/) as the data source.
## Demo
......
# A statically generated blog example using Next.js and TinaCMS
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/basic-features/pages) feature using [TinaCMS](https://tina.io/) as the CMS and editor.
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts) feature using [TinaCMS](https://tina.io/) as the CMS and editor.
> This boilerplate demonstrates a basic usage and best practices. If you are looking for a more feature rich Tina experience with contextual editing.
> check out [tina-cloud-starter](https://github.com/tinacms/tina-cloud-start/git).
......
# A statically generated blog example using Next.js and Umbraco Heartcore
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/basic-features/pages) feature using [Umbraco Heartcore](https://umbraco.com/heartcore) as the data source.
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts) feature using [Umbraco Heartcore](https://umbraco.com/heartcore) as the data source.
## Demo
......
# A statically generated blog example using Next.js and Umbraco CMS
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/basic-features/pages) feature using [Umbraco CMS](https://www.umbraco.com/) as the data source.
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts) feature using [Umbraco CMS](https://www.umbraco.com/) as the data source.
## Demo
......
# A statically generated blog example using Next.js and Webiny
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/basic-features/pages) feature using [Webiny](https://webiny.com/) as the data source.
This example showcases Next.js's [Static Generation](https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts) feature using [Webiny](https://webiny.com/) as the data source.
## Demo
......
......@@ -2,7 +2,7 @@
This example shows a Next.js application using the built-in ESLint setup with the `next` shareable configuration enabled in `.eslintrc`.
Learn more about the integrated ESLint configuration [in the docs](https://nextjs.org/docs/basic-features/eslint).
Learn more about the integrated ESLint configuration [in the docs](https://nextjs.org/docs/pages/api-reference/config/eslint).
## Deploy your own
......
......@@ -62,7 +62,7 @@ Then you can create components and pages in `.tsx` or `.ts`
- [`firebase.json`](firebase.json:#L7) outlines the catchall rewrite rule for our Cloud Function.
- The empty `public/.gitignore` file is to ensure `public/` dir exists as it is required for Firebase Hosting. It is [configured](firebase.json:#L4) (by [default](https://firebase.google.com/docs/hosting/full-config#ignore)) that dotfiles (`public/.*`) are ignored from being publicly served.
- The Cloud Function is named `nextjsFunc` (changeable in [firebaseFunctions.js](firebaseFunctions.js#L16) and [firebase.json](firebase.json#L8)).
- `public/*` files are statically served through [Firebase hosting](https://firebase.google.com/docs/hosting/full-config#public), not through [NextJs server](https://nextjs.org/docs/basic-features/static-file-serving).
- `public/*` files are statically served through [Firebase hosting](https://firebase.google.com/docs/hosting/full-config#public), not through [NextJs server](https://nextjs.org/docs/pages/api-reference/file-conventions/public-folder).
#### Customization
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment