#7 [PATCH] Plugin to add a meta robots header to each page.

closed-accepted
nobody
None
5
2012-01-21
2011-02-26
Rob
No

In a panic after Googlebot got at my Viewgit (my fault really for having no robots.txt!), I frantically hacked the template to add "noindex, nofollow". After it quit, I made it a proper ~20 line plugin that hooks into header. You can give it different attributes in the config file setting $conf['robots']; I added a comment to example-localconfig about it because it seems like a pretty commonly necessary option. The markup still validates.

Use it if you wish, but I needed it and I thought somebody else might.
Shoot me an email if I've formatted this wrong somehow, this is my first patch with Git.
[attachment: patch]

Discussion

  • Accepted, thanks for the patch, and apologies for forgetting it for so long :)

     
    • status: open --> closed-accepted