-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Improve built-in loader docs #10147
Comments
Another example that seems related:
It seems the culprit was the So yes maybe we should detail the |
Not sure if it could be worth or not, but when dealing with glob syntax, I usually link to the DO Glob Tool to test them and have a cheat sheet of the syntax: https://www.digitalocean.com/community/tools/glob In the case of the |
We use micromatch for matching |
Would happily accept more detail on the two built-in loaders! Probably on the Content Loaders API reference page makes sense? See also my comment in Issue #10152 to make sure we are unifying the code samples with similar syntax throughout. This could do some double duty with that issue! |
On Talking and Doc'ing discussed that a super quick fix (while we're in the process of improving loader docs in general) would be to add a link to micromatch: Current: Proposal: Also, this line needs to be update to include YAML: "Collections stored locally in your project or on your filesystem can have entries of Markdown, MDX, Markdoc, or JSON files:" A longer-term fix would be to separate each built-in loader and give them each more attention and explain how they work e.g. that the path is relative to the file you're in, supported file types, unique |
📋 Explain your issue
Right now we document
glob()
andfile()
in a single “Built-in loaders” subheading, but we don’t have dedicated docs anywhere for each of these. Importantly this means we’re not documenting the glob pattern stuff in detail, including what pattern matching looks like.Example use case
A user was trying to match a pattern that included a
+
. I suspect that may be interpreted in a specific way by the glob implementation, but docs don’t show or link to how glob patterns work.The text was updated successfully, but these errors were encountered: