Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support max-snippet:0 #14

Closed
dawaltconley opened this issue Mar 19, 2024 · 0 comments
Closed

Support max-snippet:0 #14

dawaltconley opened this issue Mar 19, 2024 · 0 comments

Comments

@dawaltconley
Copy link

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.

prototypa added a commit that referenced this issue May 8, 2024
prototypa added a commit that referenced this issue May 8, 2024
Fix Issue #14: Support max-snippet:0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants