| 1 | import type { Metadata } from 'next'; |
1 | import type { Metadata } from 'next'; |
| |
2 | + |
| 2 | import Link from 'next/link'; |
3 | import Link from 'next/link'; |
| 3 | import { readFile } from 'node:fs/promises'; |
4 | import { readFile } from 'node:fs/promises'; |
| 4 | import path from 'node:path'; |
5 | import path from 'node:path'; |
| 11 | import { catName, humanize } from '@/lib/taxonomy'; |
12 | import { catName, humanize } from '@/lib/taxonomy'; |
| 12 | |
13 | |
| 13 | export const metadata: Metadata = { title: 'Data & methodology', description: 'Coverage by category, source and connector; RareIndex methodology; exports and API access.' }; |
14 | export const metadata: Metadata = { title: 'Data & methodology', description: 'Coverage by category, source and connector; RareIndex methodology; exports and API access.' }; |
| 14 | −export const revalidate = 300; |
15 | +// Coverage aggregates over millions of rows take ~70 s: prerender at build (staticPageGenerationTimeout raised), then hourly ISR. |
| |
16 | +export const revalidate = 3600; |
| 15 | |
17 | |
| 16 | async function loadMethodology(): Promise<string> { |
18 | async function loadMethodology(): Promise<string> { |
| 17 | const candidates = [path.resolve(process.cwd(), '../../docs/METHODOLOGY.md'), path.resolve(process.cwd(), 'docs/METHODOLOGY.md'), path.resolve(process.cwd(), '../docs/METHODOLOGY.md')]; |
19 | const candidates = [path.resolve(process.cwd(), '../../docs/METHODOLOGY.md'), path.resolve(process.cwd(), 'docs/METHODOLOGY.md'), path.resolve(process.cwd(), '../docs/METHODOLOGY.md')]; |
| 18 | |
20 | |