unindex imprint and privacy policy

This commit is contained in:
Sascha 2025-09-26 12:30:02 +02:00
parent 94ad3ccb0e
commit df9af5625d
3 changed files with 37 additions and 1 deletions

View File

@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />

View File

@ -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 (
<section className="imprint-page">
<div className="imprint-page__container">

View File

@ -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 (
<div className="privacy-policy" style={{ maxWidth: '800px', margin: '0 auto', padding: '2rem' }}>
<h1>{texts.title}</h1>