File tree Expand file tree Collapse file tree 9 files changed +14
-11
lines changed
monthlychallenges/(challenges)/nov-2024 Expand file tree Collapse file tree 9 files changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ export async function GET(request: NextRequest) {
1515 revalidateTag ( tagParam ) ;
1616 }
1717
18+ if ( ! pathParam ) {
19+ // If no path is provided, redirect to home
20+ redirect ( '/' ) ;
21+ }
22+
1823 // Handle path-based revalidation if provided
1924 let path = typeof pathParam === 'string' ? pathParam : '/' ;
2025 if ( ! path . startsWith ( '/' ) ) {
Original file line number Diff line number Diff line change @@ -9,8 +9,6 @@ import { MDXProps } from 'mdx/types';
99import { Metadata } from 'next' ;
1010import { notFound } from 'next/navigation' ;
1111
12- // ISR: Revalidate every 24 hours
13- export const revalidate = 345600 ;
1412export const dynamicParams = false ;
1513export const dynamic = 'force-static' ;
1614
Original file line number Diff line number Diff line change @@ -10,8 +10,7 @@ import 'leaflet/dist/leaflet.css';
1010import { Suspense } from 'react' ;
1111import { MapLoader , MapLoaderDev } from './map-loader' ;
1212
13- // ISR: Revalidate every 24 hours
14- export const revalidate = 86400 ;
13+ export const dynamic = 'force-static' ;
1514
1615export async function generateMetadata ( ) {
1716 return await createMetaData ( {
Original file line number Diff line number Diff line change @@ -5,8 +5,6 @@ import LeadText from '@/components/content/LeadText';
55import Link from 'next/link' ;
66import DefaultLayout from '@/components/layouts/DefaultLayout' ;
77
8- export const revalidate = 600 ;
9-
108const handle = {
119 listTitle : 'November, 2024: 50k words!' ,
1210 meta : {
Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ import DefaultLayout from '@/components/layouts/DefaultLayout';
55import { NextPageProps } from '@/util/types' ;
66import { notFound } from 'next/navigation' ;
77
8+ export const dynamicParams = false ;
9+ export const dynamic = 'force-static' ;
10+
811export async function generateMetadata ( ) {
912 return await createMetaData ( {
1013 title : 'Virtual Coffee Newsletter' ,
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ import PostList from '@/components/PostList';
44import { getNewsletters } from '@/data/newsletters' ;
55import DefaultLayout from '@/components/layouts/DefaultLayout' ;
66
7+ export const dynamic = 'force-static' ;
8+
79const mdata = {
810 title : 'Virtual Coffee Newsletter' ,
911 description : 'Sign up for the Virtual Coffee Newsletter.' ,
Original file line number Diff line number Diff line change @@ -10,8 +10,7 @@ import { sanitizeCmsData } from '@/util/sanitizeCmsData';
1010import createCmsImage from '@/util/cmsimage' ;
1111import { Metadata } from 'next' ;
1212
13- // ISR: Revalidate every 24 hours
14- export const revalidate = 2592000 ;
13+ export const dynamic = 'force-static' ;
1514
1615export async function generateStaticParams ( ) {
1716 const podcastEpisodes = await getEpisodes ( { limit : 99 } ) ;
Original file line number Diff line number Diff line change @@ -6,8 +6,7 @@ import { getEpisodes } from '@/data/podcast';
66import { createMetaData } from '@/util/createMetaData.server' ;
77import createCmsImage from '@/util/cmsimage' ;
88
9- // ISR: Revalidate every 24 hours
10- export const revalidate = 86400 ;
9+ export const dynamic = 'force-static' ;
1110
1211export async function generateMetadata ( ) {
1312 return await createMetaData ( {
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import { Metadata } from 'next';
1111import Link from 'next/link' ;
1212import { notFound } from 'next/navigation' ;
1313
14- export const revalidate = 345600 ;
14+ // ISR: Revalidate every week
1515export const dynamicParams = false ;
1616export const dynamic = 'force-static' ;
1717
You can’t perform that action at this time.
0 commit comments