astrolib
astrolib copied to clipboard
Support `max-snippet:0`
I noticed that this package checks for the truthiness of the properties passed to it when determining whether to include the relevant tag. As a result, it's not possible to set max-snippet:0, which Google says is valid and equivalent to nosnippet.
if (maxSnippet) robotsContent.push(`max-snippet:${maxSnippet}`);
Simple fix is:
if (typeof maxSnippet === 'number') robotsContent.push(`max-snippet:${maxSnippet}`);
Happy to submit a pull request if welcome. I might also add support for max-video-preview which doesn't seem to be currently supported.