Remove experimental static page generation
This commit is contained in:
parent
c0225fc282
commit
61744f0c99
@ -90,7 +90,6 @@ _⚠️ READ BEFORE PROCEEDING_
|
||||
Application behavior can be changed by configuring the following environment variables:
|
||||
|
||||
- `NEXT_PUBLIC_PRO_MODE = 1` enables higher quality image storage for jpgs (results in increased storage usage)
|
||||
- `NEXT_PUBLIC_STATICALLY_OPTIMIZE = 1` enables static optimization, i.e., building pages ahead of time (results in increased storage usage)—⚠️ _Experimental_
|
||||
- `NEXT_PUBLIC_BLUR_DISABLED = 1` prevents image blur data being stored and displayed (potentially useful for limiting Postgres usage)
|
||||
- `NEXT_PUBLIC_GEO_PRIVACY = 1` disables collection/display of location-based data
|
||||
- `NEXT_PUBLIC_IGNORE_PRIORITY_ORDER = 1` prevents `priority_order` field affecting photo order
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import {
|
||||
GENERATE_STATIC_PARAMS_LIMIT,
|
||||
GRID_THUMBNAILS_TO_SHOW_MAX,
|
||||
descriptionForPhoto,
|
||||
titleForPhoto,
|
||||
@ -12,20 +11,8 @@ import {
|
||||
absolutePathForPhotoImage,
|
||||
} from '@/site/paths';
|
||||
import PhotoDetailPage from '@/photo/PhotoDetailPage';
|
||||
import { getPhotoIds } from '@/services/vercel-postgres';
|
||||
import { STATICALLY_OPTIMIZED } from '@/site/config';
|
||||
import { getPhotosNearIdCachedCached } from '@/photo/cache';
|
||||
|
||||
export let generateStaticParams:
|
||||
(() => Promise<{ photoId: string }[]>) | undefined = undefined;
|
||||
|
||||
if (STATICALLY_OPTIMIZED) {
|
||||
generateStaticParams = async () => {
|
||||
const photos = await getPhotoIds({ limit: GENERATE_STATIC_PARAMS_LIMIT });
|
||||
return photos.map(photoId => ({ photoId }));
|
||||
};
|
||||
}
|
||||
|
||||
interface PhotoProps {
|
||||
params: { photoId: string }
|
||||
}
|
||||
|
||||
@ -13,8 +13,6 @@ import {
|
||||
import camelcaseKeys from 'camelcase-keys';
|
||||
import type { Metadata } from 'next';
|
||||
|
||||
export const GENERATE_STATIC_PARAMS_LIMIT = 1000;
|
||||
|
||||
// ROOT PAGE
|
||||
export const INFINITE_SCROLL_INITIAL_HOME =
|
||||
process.env.NODE_ENV === 'development' ? 2 : 12;
|
||||
|
||||
@ -39,7 +39,6 @@ export default function SiteChecklistClient({
|
||||
showFilmSimulations,
|
||||
showExifInfo,
|
||||
isProModeEnabled,
|
||||
isStaticallyOptimized,
|
||||
isBlurEnabled,
|
||||
isGeoPrivacyEnabled,
|
||||
isPriorityOrderEnabled,
|
||||
@ -334,17 +333,6 @@ export default function SiteChecklistClient({
|
||||
higher quality image storage:
|
||||
{renderEnvVars(['NEXT_PUBLIC_PRO_MODE'])}
|
||||
</ChecklistRow>
|
||||
<ChecklistRow
|
||||
title="Static Optimization"
|
||||
status={isStaticallyOptimized}
|
||||
isPending={isPendingPage}
|
||||
optional
|
||||
experimental
|
||||
>
|
||||
Set environment variable to {'"1"'} to enable
|
||||
static optimization, i.e., build pages ahead of time:
|
||||
{renderEnvVars(['NEXT_PUBLIC_STATICALLY_OPTIMIZE'])}
|
||||
</ChecklistRow>
|
||||
<ChecklistRow
|
||||
title="Image Blur"
|
||||
status={isBlurEnabled}
|
||||
|
||||
@ -103,8 +103,6 @@ export const CURRENT_STORAGE: StorageType =
|
||||
|
||||
export const PRO_MODE_ENABLED =
|
||||
process.env.NEXT_PUBLIC_PRO_MODE === '1';
|
||||
export const STATICALLY_OPTIMIZED =
|
||||
process.env.NEXT_PUBLIC_STATICALLY_OPTIMIZE === '1';
|
||||
export const BLUR_ENABLED =
|
||||
process.env.NEXT_PUBLIC_BLUR_DISABLED !== '1';
|
||||
export const GEO_PRIVACY_ENABLED =
|
||||
@ -156,7 +154,6 @@ export const CONFIG_CHECKLIST_STATUS = {
|
||||
showFilmSimulations: SHOW_FILM_SIMULATIONS,
|
||||
showExifInfo: SHOW_EXIF_DATA,
|
||||
isProModeEnabled: PRO_MODE_ENABLED,
|
||||
isStaticallyOptimized: STATICALLY_OPTIMIZED,
|
||||
isBlurEnabled: BLUR_ENABLED,
|
||||
isGeoPrivacyEnabled: GEO_PRIVACY_ENABLED,
|
||||
isAiTextGenerationEnabled: AI_TEXT_GENERATION_ENABLED,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user