Disallow GPT in robots.txt

Enable robots.txt in your hugo.toml (formerly config.toml):

enableRobotsTXT = true

Add a file layouts/robots.txt with:

User-agent: GPTBot
Disallow: /

User-agent: *
Allow: /