Skip to content

Commit 06ebfb8

Browse files
committed
docs: edits to building pages entry - work in progress
1 parent 04f4295 commit 06ebfb8

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

www/content/docs/pages.mdx

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,10 @@ title: Building Pages
33
excerpt: How to build pages using JSON:API resources from Drupal.
44
---
55

6-
In Next.js V14, data fetching has evolved significantly from previous versions. Instead of using `getStaticProps` and `getServerSideProps` you now use the native `fetch` function enhanced by Next.js to handle server-side data fetching.
7-
8-
The `NextDrupal` client provides several functions to help you query JSON:API resources from Drupal.
9-
10-
<!--
11-
************************************************************
12-
* TODO: Remove this block before publishing.
13-
14-
* Comment: Need to corroborate (and maybe update) once next-drupal supports `next` revalidation options. Possible replacement for above introduction once it's supported
15-
16-
In Next.js V14, data fetching has evolved significantly from previous versions. Instead of using `getStaticProps` and `getServerSideProps` you now use the native `fetch` function enhanced by Next.js to handle server-side data fetching. This allows you to configure caching and revalidation directly within your fetch requests. These can be used in Server Components, Route Handlers, and Server Actions. You can read more about it [here](https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating)
6+
In Next.js V14, data fetching has evolved significantly from previous versions. Instead of using `getStaticProps` and `getServerSideProps` you now use the native `fetch` function enhanced by Next.js to handle server-side data fetching. This also allows you to configure caching and revalidation directly within your fetch requests. These can be used in Server Components, Route Handlers, and Server Actions. You can read more about it [here](https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating).
177

188
The `NextDrupal` client provides several functions to help you query JSON:API resources from Drupal and manage these revalidation options on the `fetch` request level.
199

20-
************************************************************
21-
-->
22-
2310
---
2411

2512
## Basic Example
@@ -53,6 +40,8 @@ export default function AboutPage() {
5340
}
5441
```
5542

43+
TODO - time based revalidation.
44+
5645
---
5746

5847
## Dynamic pages
@@ -156,10 +145,12 @@ export default function Page({ params }) {
156145
}
157146
```
158147

148+
TODO - tag based revalidation.
149+
159150
## Reference
160151

161152
See the [fetching JSON:API resources](/docs/fetching-resources) section for more examples of fetching resources and collection of resources.
162153

163154
## Pages Router
164155

165-
TODO
156+
TODO - Port some examples from the previous docs.

www/pages/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ export default function IndexPage({ features }: IndexPageProps) {
3434

3535
return (
3636
<Layout title={site.name} description={site.description}>
37-
TODO - Re-order elements on home page
37+
TODO - Re-order elements on home page TODO - A Last docs wide search for
38+
'TODO'
3839
<section className="relative px-6 pt-12 pb-8 md:py-12 md:pb-8">
3940
<div className="container max-w-4xl mx-auto text-center">
4041
<Link

0 commit comments

Comments
 (0)