/** * Privacy policy (#699): content/privacy.md, written by the owner in the * admin panel. Folio ships no legal text of its own. */ import { Metadata } from 'next'; import { notFound } from 'next/navigation'; import { getConfig } from '@/lib/config'; import { BackLink } from '@/components/BackLink'; import { getServerDictionary } from '@/lib/i18n/server'; import { parseMarkdownBlocks } from '@/lib/markdownBlocks'; import { privacyAvailable, readPrivacy } from '@/lib/privacy'; import './privacy.css'; export function generateMetadata(): Metadata { if (!privacyAvailable(getConfig())) return {}; return { title: getServerDictionary().privacy.title, robots: { index: false, follow: true }, }; } export const dynamic = 'force-dynamic'; export default function PrivacyPage() { const t = getServerDictionary(); if (!privacyAvailable(getConfig())) notFound(); const blocks = parseMarkdownBlocks(readPrivacy()); return (

{t.privacy.title}

{/* Every html string below comes from renderInlineMarkdown, which escapes the author's text before adding its own tags. */}
{blocks.map((block, i) => { if (block.type === 'heading') { const Tag = block.level === 2 ? 'h2' : 'h3'; return ; } if (block.type === 'list') { const List = block.ordered ? 'ol' : 'ul'; return ( {block.items.map((item, j) => (
  • ))} ); } return

    ; })}

  • ); }