-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
document helper functions passed to gatsby-node APIs #4120
Comments
@chmac Yes please, 👍 for additional docs.
There's actually a bunch of helpers that get passed in to each Maybe this should be another page in the reference section of the docs, called Gatsby Node Utils? @KyleAMathews might have a better idea on where this should go and what to call it. If the docs were to go in the reference section, you'd add a markdown file to the docs folder, and then reference it in doc-links.yaml. Don't hesitate to ask questions at any point! |
Yeah, we need a docs page for all the utils. We should build it like the other reference docs pages like adding jsdocs section to each utility and then querying them to create the page. |
Hi folks, I'd be happy to help with this effort as well. |
Good stuff @vprasanth!
@KyleAMathews What's the best way to document these? Should there be a reference page for the methods in |
It's best to have functions documented where they're defined. So let's add jsdocs comments there then when we create the page, we can query directly for the docs for the names of the functions we need
|
Thanks for jumping in to help @vprasanth! This has needed done for a while now 😅 |
Alright great, I think I understand. Thanks @m-allanson for doing that leg work :) I'll give it a shot tonight. |
Hey can someone take a quick look at this and let me know if I'm going generally in the right direction: Thanks! |
Looking good! Keep going and put a PR any time. |
Thanks to @vprasanth for adding jsdocs for these methods. Reopening as the docs could still be exposed as part of gatsbyjs.org. See #4120 (comment) |
I'd like to take this up. |
@KyleAMathews I am a little confused about this. action-docs queries this-file that has all the actions defined in it and they have their jsdocs ready to go. on the other hand node-api-docs query a file called node-api-docs which looks like a stub for all of the functions. do the jsdocs need to go in the last file I linked to? or do they need to go somewhere else in the codebase? |
I'd like to report some update on this - I started looking more into this and realized that our current And here's what it currently looks like with those changes (will definitely need some design modifications): ATM I'm focusing on adding needed functionality, so help with documentation will still be needed @deltaskelta we will create stub like file for it (like with node-api-docs), a lot of those utils need to be setup per plugin so we can't use |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open! Thanks for being a part of the Gatsby community! 💪💜 |
After long time without updates on this - their is finally PR open #12087 (there is preview link to new page in PR description). Any help with improving initial jsdocs I wrote for helpers is very welcome. |
This includes changes from #11597 which is needed for nested and also some really unrelated changes (to make preview work on netlify). Actual changes for review are limited to pieh/gatsby@58c6855...pieh:www-doc-preview .org preview available at https://www-doc-preview--tender-curie-facda8.netlify.com/docs/node-api-helpers/ TO-DO before the merge: - [x] change new path to `/docs/node-api-helpers` (from `/docs/node-apis-helpers`) - [x] remove temporary commit that allow to build previews on netlify ( 58c6855 ) - [x] merge #11597 and remove commits from that PR from this branch Closes #4120
Description
I have a collection of markdown files that I'd like to become blog posts. In the course of trying to figure out how to filter by folder, I came across
getNode()
in various code samples, but I can't find anything about it the docs.It seems to be a part of theboundActionCreators
insideonCreateNode
, but I'm not 100% sure of that.Can we add it to the docs? I'm happy to have a bash if somebody can point me the right direction.
EDIT: I realise that
getNode
looks like a sibling ofboundActionCreators
rather than a child of it.The text was updated successfully, but these errors were encountered: