import type { Metadata } from 'next' import Link from 'next/link' import { MDXRemote } from 'next-mdx-remote/rsc' import type { ImgHTMLAttributes } from 'react' import { components } from '@/components/mdx' import { type ExtensionUpdateMetadata, getExtensionUpdateByVersion, getLatestExtensionUpdate } from '@/lib/extension-updates' import { getRoute } from '@/lib/routes' import { generateBaseMetadata } from '@/lib/seo/seo-config' const CHROME_STORE_URL = 'https://chromewebstore.google.com/detail/llmstxt-checker/klcihkijejcgnaiinaehcjbggamippej' interface WhatsNewPageProps { searchParams: Promise<{ v?: string pv?: string lang?: string src?: string }> } export const metadata: Metadata = generateBaseMetadata({ title: "What's New | LLMs.txt Checker", description: 'Release highlights and updates for the LLMs.txt Checker extension.', path: getRoute('extension.whatsNew'), noindex: true, keywords: ['llms.txt checker', 'whats new', 'release notes', 'extension updates'] }) const normalizeVersion = (value?: string): string => { if (typeof value !== 'string') { return '' } const normalized = value.trim().toLowerCase() return normalized.startsWith('v') ? normalized.slice(1) : normalized } const resolveRelease = (requestedVersion?: string): ExtensionUpdateMetadata | null => { if (typeof requestedVersion !== 'string' || requestedVersion.trim().length === 0) { return getLatestExtensionUpdate() } return getExtensionUpdateByVersion(requestedVersion) || getLatestExtensionUpdate() } const formatReleaseDate = (date: string): string => { const parsed = new Date(date) if (Number.isNaN(parsed.getTime())) { return date } return parsed.toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' }) } type ExtensionMdxImageProps = ImgHTMLAttributes const extensionMdxComponents = { ...components, img: ({ className, alt = '', title, ...props }: ExtensionMdxImageProps) => { const caption = typeof title === 'string' && title.trim().length > 0 ? title.trim() : null return ( <> {alt} {caption && ( {caption} )} ) } } export default async function ExtensionWhatsNewPage({ searchParams }: WhatsNewPageProps) { const { v, pv, lang } = await searchParams const release = resolveRelease(v) if (!release) { return (

No release notes available yet

We could not find release notes for this version.

Chrome Web Store Go to llms.txt Hub
) } const normalizedCurrentVersion = normalizeVersion(release.version) const normalizedPreviousVersion = normalizeVersion(pv) const showPreviousVersion = normalizedPreviousVersion.length > 0 && normalizedPreviousVersion !== normalizedCurrentVersion const showEnglishNotice = !!lang && !lang.toLowerCase().startsWith('en') return (

LLMs.txt Checker

{release.title}

{release.description}

Version {release.version} {formatReleaseDate(release.date)} {showPreviousVersion && ( Updated from {normalizedPreviousVersion} )}
{showEnglishNotice && (

Release notes are currently available in English only.

)}

Top highlights

    {release.highlights.slice(0, 5).map(highlight => (
  • {highlight}
  • ))}

Where to go next

Chrome Web Store LLMs.txt Hub homepage
) }