This commit is contained in:
ryan
2026-07-13 15:08:40 +08:00
parent 08e8eea932
commit 1eff7878a1
441 changed files with 26491 additions and 18405 deletions
+7 -7
View File
@@ -1,17 +1,17 @@
"use client"
'use client';
import {usePublicConfig} from "@/hooks/use-public-config"
import { usePublicConfig } from '@/hooks/use-public-config';
export function RobotsMeta() {
const { config } = usePublicConfig()
const { config } = usePublicConfig();
// Default to noindex, nofollow if config is loading or if it's explicitly disabled
const enabled = config?.search_engine_indexing_enabled === "true"
const enabled = config?.search_engine_indexing_enabled === 'true';
return (
<meta
name="robots"
content={enabled ? "index, follow" : "noindex, nofollow"}
name='robots'
content={enabled ? 'index, follow' : 'noindex, nofollow'}
/>
)
);
}