From df9af5625d5253cc2866e9f4c2a249a06ffd5c11 Mon Sep 17 00:00:00 2001 From: Sascha Date: Fri, 26 Sep 2025 12:30:02 +0200 Subject: [PATCH] unindex imprint and privacy policy --- index.html | 2 +- src/pages/ImprintPage.tsx | 18 ++++++++++++++++++ src/pages/PrivacyPolicy.tsx | 18 ++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 9e880c6..f1606d6 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ - + diff --git a/src/pages/ImprintPage.tsx b/src/pages/ImprintPage.tsx index 34f9628..f8adc79 100644 --- a/src/pages/ImprintPage.tsx +++ b/src/pages/ImprintPage.tsx @@ -1,8 +1,26 @@ +import { useEffect } from 'react'; import { personalConfig } from '../config/personal'; import { getTexts } from '../config/texts'; export default function ImprintPage() { const texts = getTexts().imprint; + + useEffect(() => { + // Prevent indexing of this page + const metaRobots = document.createElement('meta'); + metaRobots.name = 'robots'; + metaRobots.content = 'noindex, nofollow'; + document.head.appendChild(metaRobots); + + // Cleanup on unmount + return () => { + const existingMeta = document.querySelector('meta[name="robots"]'); + if (existingMeta) { + document.head.removeChild(existingMeta); + } + }; + }, []); + return (
diff --git a/src/pages/PrivacyPolicy.tsx b/src/pages/PrivacyPolicy.tsx index 658756e..41d714f 100644 --- a/src/pages/PrivacyPolicy.tsx +++ b/src/pages/PrivacyPolicy.tsx @@ -1,7 +1,25 @@ +import { useEffect } from 'react'; import { getTexts } from '../config/texts'; export default function PrivacyPolicy() { const texts = getTexts().privacyPolicy; + + useEffect(() => { + // Prevent indexing of this page + const metaRobots = document.createElement('meta'); + metaRobots.name = 'robots'; + metaRobots.content = 'noindex, nofollow'; + document.head.appendChild(metaRobots); + + // Cleanup on unmount + return () => { + const existingMeta = document.querySelector('meta[name="robots"]'); + if (existingMeta) { + document.head.removeChild(existingMeta); + } + }; + }, []); + return (

{texts.title}