create-landing-app 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/templates/nextjs/optional/sections/blog/files/app/[lang]/blogs/(list)/[category]/page.tsx +4 -2
- package/templates/nextjs/optional/sections/blog/files/app/[lang]/blogs/(list)/layout.tsx +4 -2
- package/templates/nextjs/optional/sections/blog/files/app/[lang]/blogs/detail/[slugNews]/page.tsx +4 -2
package/package.json
CHANGED
package/templates/nextjs/optional/sections/blog/files/app/[lang]/blogs/(list)/[category]/page.tsx
CHANGED
|
@@ -3,8 +3,10 @@ import { createMetadata } from "@/lib/metadata";
|
|
|
3
3
|
import { cache } from "react";
|
|
4
4
|
import MainPage from "./main-page";
|
|
5
5
|
|
|
6
|
-
//
|
|
7
|
-
|
|
6
|
+
// ISR: revalidate every 60s — only visited pages regenerate, unvisited stay cached
|
|
7
|
+
// For instant updates on admin publish, use on-demand revalidation: https://nextjs.org/docs/app/building-your-application/data-fetching/incremental-static-regeneration#on-demand-revalidation-with-revalidatepath
|
|
8
|
+
// To disable ISR and always fetch fresh: replace with `export const dynamic = "force-dynamic"`
|
|
9
|
+
export const revalidate = 60;
|
|
8
10
|
|
|
9
11
|
const getCategories = cache(getBlogCategories);
|
|
10
12
|
|
|
@@ -3,8 +3,10 @@ import FooterSection from "@/components/sections/footer-section";
|
|
|
3
3
|
import LayoutBlogs from "@/components/navs/layout-blogs";
|
|
4
4
|
import { getBlogCategories } from "@/lib/blog-api";
|
|
5
5
|
|
|
6
|
-
//
|
|
7
|
-
|
|
6
|
+
// ISR: revalidate every 60s — only visited pages regenerate, unvisited stay cached
|
|
7
|
+
// For instant updates on admin publish, use on-demand revalidation: https://nextjs.org/docs/app/building-your-application/data-fetching/incremental-static-regeneration#on-demand-revalidation-with-revalidatepath
|
|
8
|
+
// To disable ISR and always fetch fresh: replace with `export const dynamic = "force-dynamic"`
|
|
9
|
+
export const revalidate = 60;
|
|
8
10
|
|
|
9
11
|
export default async function Layout({
|
|
10
12
|
children,
|
package/templates/nextjs/optional/sections/blog/files/app/[lang]/blogs/detail/[slugNews]/page.tsx
CHANGED
|
@@ -6,8 +6,10 @@ import { BlogDetailView } from "./blog-detail-view";
|
|
|
6
6
|
import Navbar from "@/components/navs/navbar";
|
|
7
7
|
import FooterSection from "@/components/sections/footer-section";
|
|
8
8
|
|
|
9
|
-
//
|
|
10
|
-
|
|
9
|
+
// ISR: revalidate every 60s — only visited pages regenerate, unvisited stay cached
|
|
10
|
+
// For instant updates on admin publish, use on-demand revalidation: https://nextjs.org/docs/app/building-your-application/data-fetching/incremental-static-regeneration#on-demand-revalidation-with-revalidatepath
|
|
11
|
+
// To disable ISR and always fetch fresh: replace with `export const dynamic = "force-dynamic"`
|
|
12
|
+
export const revalidate = 60;
|
|
11
13
|
|
|
12
14
|
// Pre-render top 20 blog detail pages at build time; remaining slugs render on first visit then get cached
|
|
13
15
|
export async function generateStaticParams() {
|