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

Allow priority value of 0 #517

Merged
merged 1 commit into from
Oct 18, 2023
Merged

Conversation

bakerkretzmar
Copy link
Contributor

This PR ensures that a URL's priority can be set to 0.

The <priority> tag accepts values from 0.0 to 1.0, but this package currently strips out values like 0 and 0.0 (it's possible to work around this by passing something like 0.01, which is rounded down to 0.0 and kept, but that's not ideal).

Omitting the <priority> tag is not the same as setting it to 0, because the default priority is 0.5.

Docs: https://www.sitemaps.org/protocol.html#xmlTagDefinitions

@freekmurze freekmurze merged commit c6b8cdb into spatie:main Oct 18, 2023
9 checks passed
@freekmurze
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants