tannerdolby / eleventy-plugin-metagen

Eleventy shortcode that generates document metadata
https://www.npmjs.com/package/eleventy-plugin-metagen
MIT License
41 stars 3 forks source link

Added robots meta tag to be able to set noindex on a page #18

Closed ItsMeAra closed 2 years ago

ItsMeAra commented 2 years ago

Adding robots meta tag like <meta name="robots" content="noindex">. Currently doing this outside of metagen but figured I'd add it and open a PR in case you'd like to add it.

Cheers!

tannerdolby commented 2 years ago

👋 @ItsMeAra Thank you for the contribution!

The <meta name="robots"> tag definitely needed to be added. I appreciate you updating the test and necessary files. I'm going to merge this PR and build on it a little bit afterwards to allow for multiple "crawler" tags to be specified i.e. both of the following will be supported:

<meta name="robots" content="noindex" />

& support will be added provide a to metagen (will document functionality when I add it) to generate custom "crawler" tags

<meta name="googlebot" content="noindex">
<meta name="googlebot-news" content="nosnippet">
tannerdolby commented 2 years ago

Expect v1.6.1 containing the above additions to be published on npm within the next few days! 🚀

tannerdolby commented 2 years ago

v1.6.1 is now published on npm and support for robots and crawlers is available