gatsby-plugin-sitemap: Update README.md #38684
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
I found this plugin surprisingly difficult to set up and spent quite a bit of time unraveling the errors I was getting (mostly the cryptic "error in default filter").
The descriptions of the functions, and especially the types of their parameters and return values, confused me. (In particular, I still can't parse the second sentence of the description of
query
, so my edit may actually be incorrect). After I completed setup in my project, I wanted to explain some of the information I'd learned through trial-and-error.Since the project is not written in TypeScript and there are many
object
types, I wanted to be more explicit about the expected properties on those objects. For example, it's not obvious thatpath
is a required property in the page objects returned by a customresolvePages
.I also made some other stylistic/copy changes which to me make the documentation easier to read, but those are less important.
Thank you for your efforts writing this plugin and your time reading, I hope this PR is received well.