generated from pascalmartineau/wp-skeleton
fix: prevent indexing virtual pages
This commit is contained in:
@@ -4,6 +4,7 @@ import type { ThePageFragment } from "#graphql-operations";
|
|||||||
const props = defineProps<ThePageFragment>();
|
const props = defineProps<ThePageFragment>();
|
||||||
|
|
||||||
if (props.template?.__typename === "Template_VirtualPage") {
|
if (props.template?.__typename === "Template_VirtualPage") {
|
||||||
|
useRobotsRule({ noindex: true });
|
||||||
await navigateTo(props.children?.nodes[0]?.uri || "/");
|
await navigateTo(props.children?.nodes[0]?.uri || "/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user