astrolib icon indicating copy to clipboard operation
astrolib copied to clipboard

Support `max-snippet:0`

Open dawaltconley opened this issue 1 year ago • 0 comments

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.

dawaltconley avatar Mar 19 '24 23:03 dawaltconley