nodejs.dev icon indicating copy to clipboard operation
nodejs.dev copied to clipboard

Gather Node.js API docs during build-time

Open ovflowd opened this issue 1 year ago • 0 comments

Enter your suggestions in details:

Currently, we're fetching data from Node.js API docs on a React Hook during the application's runtime. This creates several issues, such as:

  • No individual links for each page
  • Hard time to get SEO and for the pages to get indexed
  • Broken internal links

The idea is to create a utility that goes over the data during build-time (Written in Node.js) and creates pages using Gatsby's createPage functionality. Within the utility, we would also remap links based on the https://noejs.org pages to the new https://nodejs.dev website. (As we could try to follow the same pattern).

ovflowd avatar Aug 03 '22 11:08 ovflowd

Relates to https://github.com/nodejs/nodejs.dev/issues/2630

ovflowd avatar Aug 22 '22 00:08 ovflowd

Is anyone working on it?? If not then I would love to work on this. Please let me know as soon as possible.

iSatVeerSingh avatar Aug 27 '22 03:08 iSatVeerSingh

Is anyone working on it?? If not then I would love to work on this. Please let me know as soon as possible.

Yes, we're already working on this one. Sorry @iSatVeerSingh, but this specific task requires deep knowledge regarding our Docs system and the overall structure of the project, and other things. I would recommend giving an eye to another task 🙂

ovflowd avatar Aug 27 '22 14:08 ovflowd

@ovflowd if you need any help or somebody work with you. Please consider me.

iSatVeerSingh avatar Aug 28 '22 01:08 iSatVeerSingh

can I still submit a PR?

iSatVeerSingh avatar Aug 28 '22 01:08 iSatVeerSingh

Sure, you’re always free to submit a PR. I’m just trying to be honest here that this Issue requires context you lack of… But do what you please :)

ovflowd avatar Aug 28 '22 08:08 ovflowd

I'm also not sure if this is really a feature that will land. Today these files aren't in the nodejs.org repo, as you're taking about a lot of files per version, times the number of releases that Node.js has had (major, minor, patch)

nschonni avatar Aug 28 '22 15:08 nschonni

I'm also not sure if this is really a feature that will land. Today these files aren't in the nodejs.org repo, as you're taking about a lot of files per version, times the number of releases that Node.js has had (major, minor, patch)

I believe what we want to achieve here is to only provide docs for the actively maintained releases. The ones described here: https://nodejs.dev/en/download/ (Upcoming Releases).

The path for the docs would be /api/. All the older docs would work the same way nodejs.org does today, redirecting them to the /docs/ folder of the website. (https://nodejs.org/docs/)...

ovflowd avatar Aug 28 '22 16:08 ovflowd

Also, @nschonni, we have a slack thread with all details for how we're going to code the retrieval and parsing of these docs on the related issue and also within a Slack thread. I'm expecting to work on this either starting later today or next week.

ovflowd avatar Aug 28 '22 16:08 ovflowd