Closed xuhdev closed 2 months ago
Hi @xuhdev,
That's a very good suggestion. I am checking this very thing.
Will keep you posted...
Hi @xuhdev,
You can now customize how you can use robots meta.
denyRobots
: Specify what directives to follow when denying crawlers. Default is noindex, nofollow, noarchiveallowRobots
: Specify what directives to follow when allowing crawlers. Default is index, followFor specific pages generated by user:
noIndex
: When set to true, the page has noindex, nofollow, noarchive (unless specified by denyRobots
) added to robots meta tag. Else, robots tag will have index, follow (unless specified by allowRobots
) For specific pages generated by Hugo:
noIndexPages
: Specify on which pages crawlers will be denied. Pages specified will have noindex, nofollow, noarchive (unless specified by denyRobots
) added to robots meta tag. Use Page title to select pages. Useful for the pages generated by Hugo. Eg.
noIndexPages = ["404 Page not found", "Tags"]
For whole site (not sure why one would want that):
siteNoIndex
: When set to true, whole site will have noindex, nofollow, noarchive (unless specified by denyRobots
) added to robots meta tag. Else, robots tag will have index, follow (unless specified by allowRobots
) applied to whole siteLet me know if you find any other issues, suggestions regarding this.
It works, thanks!
Please consider a variable that lets a user specify whether a page should not be indexed by Search Engines. This would allow pages such terms of services, privacy policies, and even some tag pages from being indexed.
This would be similar to the
robotsNoIndex
option from PaperMod.