-
Notifications
You must be signed in to change notification settings - Fork 1k
feat(docs): introduced initial version of api docs system #2680
Conversation
7d3d53c
to
47ca3df
Compare
Codecov Report
@@ Coverage Diff @@
## main #2680 +/- ##
===========================================
- Coverage 87.51% 68.83% -18.69%
===========================================
Files 100 119 +19
Lines 977 1325 +348
Branches 252 333 +81
===========================================
+ Hits 855 912 +57
- Misses 115 379 +264
- Partials 7 34 +27
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Please find a preview at: https://staging.nodejs.dev/2680/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks Good 🙌🏼
The only nit I had was that since there's no versioning here in this initial version, maybe we could mention the latest version of Node for which this documentation is for somewhere?
Also, the last page is returning blank for me: https://staging.nodejs.dev/2680/en/api/modules/
Oh damn, it looks like MDX is trying to interpolate this piece as an actual JavaScript code 🤦 (https://github.com/nodejs/node/blob/main/doc/api/modules.md?plain=1#L276) |
Please find a preview at: https://staging.nodejs.dev/2680/ |
Please find a preview at: https://staging.nodejs.dev/2680/ |
Note.: For some reason when clicking on the I have no idea if this is a thing from Gatsby or Google Cloud 🤯 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redirects are working fine for me. However, navigating the side nav feels weird with Globals
and Classes
sections having links to a section of the Globals page (https://staging.nodejs.dev/2680/en/api/v18/globals). Maybe we can remove them altogether? Since they're also not present on the original website.
Also, maybe it's a problem with the original website itself, but some pages in Docs seem to have different titles in on the documentation homepage. E.g., See the docs homepage and assert page.
If it is intended, can we use the source of the page list that's being used here in the Sidebar?
Oh I removed them intentionally let me add them back! |
I don’t see any value in this, besides of extra work. Sorry, not gonna do 😅
Why would this be an issue? Links are the same. The titles here are sourced from the first Heading. |
@manishprivet it is important to mention that the current Nodejs.org docs Sidebar comes from here. But one of the main reasons the current PR does its Navigation the way it does it's to easily allow people to access Classes and Globals, linked directly to their paths. Clicking for example on "setImmediate" within the Navigation should redirect you to /api/v18/globals#setImmediate...somethingsomething. |
@benhalverson @manishprivet I'm also updating the Search Bar to have better results |
Please find a preview at: https://staging.nodejs.dev/2680/ |
Trying to re-push as for some reason 3 commits where shown locally as not synced, but no idea. |
I like this. The PR is rather large now. Can the search results changes be in a follow up PR instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I made changes to the SearchBar within this PR because otherwise, it would be hard to differentiate Learn from API pages, and the API pages title in the SearchBox were just the name of the module e.g. "fs". So if you searched for "File system path" it would just show "fs", so it fell like a necessary change. |
I will merge this PR as it is, as we can reiterate further improvements in style, content and features later. Such as, for example, the "Sidebar Version Selection". In a very soon PR, I want to:
|
Description
This PR introduces an initial version of a script that retrieves the Markdown files for each API version of the current non-EOL and non-Pending Node.js API docs.
This PR introduces the mechanisms that modifies the
<!-- YAML -->
API tags into an MDX Component for rendering the Metadata as inhttps://nodejs.org/api
.It also introduces mechanisms to create the Frontmatter of the Codebase.
This PR will also replace the current
docs.tsx
page into a template and remove all its garbage code.Related Issues
Closes https://github.com/nodejs/nodejs.dev/issues/2611
Closes https://github.com/nodejs/nodejs.dev/issues/2630
Check List
npm run lint:js -- --fix
and/ornpm run lint:md -- --fix
for my JavaScript and/or Markdown changes.npm run test
to check if all tests are passing, and/ornpm run test -- -u
to update snapshots if I created and/or updated React Components.npm run build
work fine.