Skip to content

feat(pages): add N-API pages#44

Open
avivkeller wants to merge 6 commits intomainfrom
napi
Open

feat(pages): add N-API pages#44
avivkeller wants to merge 6 commits intomainfrom
napi

Conversation

@avivkeller
Copy link
Copy Markdown
Member

cc @nodejs/node-api

I've re-written these files from https://github.com/nodejs/node-addon-examples/tree/main/website/docs. Please note that these files are not identical to the previous versions. I've made some minor adjustments, including, but not limited to:

  1. Moving duplicate content to it's own file, pages/napi/getting-started/project-structure.md, and adding index.md pages
  2. Removing references to deprecated or outdated tooling, such as Yeoman.
  3. Fixing outdated information, such as the Python version needed for node-gyp.
  4. Minor prose changes, such as typo fixes or grammatical improvements.

The authors of these files are currently marked as @gabrielschulhof, @NickNaso, @jschlight, @mhdawson, @KevinEady, and myself, @avivkeller.

Copilot AI review requested due to automatic review settings April 6, 2026 16:42
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nodejs-learn Ready Ready Preview Apr 24, 2026 8:18pm

Request Review

Signed-off-by: Aviv Keller <me@aviv.sh>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Node-API (N-API) documentation section to the Learn site, including sidebar navigation and a set of rewritten guides ported from node-addon-examples.

Changes:

  • Add a new “Node-API” group to site.json sidebar navigation.
  • Add new Node-API docs pages (overview, getting started, build tools, special topics).
  • Update Sidebar pathname handling to better support index.md-based routes.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 32 comments.

Show a summary per file
File Description
site.json Adds “Node-API” section + links to the Learn sidebar
components/Sidebar/index.jsx Adjusts pathname handling to strip /index
pages/napi/index.md Introduces Node-API landing page content
pages/napi/getting-started/index.md Adds Getting Started index page
pages/napi/getting-started/prerequisites.md Adds prerequisites content
pages/napi/getting-started/tools.md Adds tooling/setup guidance
pages/napi/getting-started/project-structure.md Adds shared project structure reference
pages/napi/getting-started/your-first-project.md Adds first-project tutorial
pages/napi/getting-started/objectwrap.md Adds ObjectWrap tutorial
pages/napi/getting-started/migration.md Adds NAN → Node-API migration tutorial
pages/napi/build-tools/index.md Adds build-tools index page
pages/napi/build-tools/node-gyp.md Adds node-gyp guide
pages/napi/build-tools/cmake-js.md Adds CMake.js guide
pages/napi/build-tools/node-pre-gyp.md Adds node-pre-gyp guide
pages/napi/build-tools/prebuild.md Adds prebuild guide
pages/napi/special-topics/index.md Adds special-topics index page
pages/napi/special-topics/asyncworker.md Adds AsyncWorker guide
pages/napi/special-topics/object-function-refs.md Adds references guide
pages/napi/special-topics/thread-safe-functions.md Adds thread-safe functions guide
pages/napi/special-topics/context-awareness.md Adds context-awareness guide + examples

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread components/Sidebar/index.jsx
Comment thread pages/napi/getting-started/prerequisites.md
Comment thread pages/napi/getting-started/prerequisites.md
Comment thread pages/napi/getting-started/tools.md
Comment thread pages/napi/getting-started/tools.md
Comment thread pages/napi/special-topics/thread-safe-functions.md Outdated
Comment thread pages/napi/special-topics/object-function-refs.md Outdated
Comment thread pages/napi/special-topics/object-function-refs.md Outdated
Comment thread pages/napi/special-topics/asyncworker.md Outdated
Comment thread pages/napi/getting-started/migration.md Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Aviv Keller <me@aviv.sh>
Signed-off-by: Aviv Keller <me@aviv.sh>
@avivkeller
Copy link
Copy Markdown
Member Author

Bump @nodejs/node-api @nodejs/nodejs-website

Comment thread pages/napi/build-tools/node-pre-gyp.md Outdated
Comment thread pages/napi/build-tools/prebuild.md Outdated
Comment thread pages/napi/build-tools/node-gyp.md Outdated
@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 24, 2026

PR Summary

Low Risk
Low risk: primarily adds new MDX documentation pages and updates sidebar navigation, with only a small, localized change to Sidebar pathname normalization.

Overview
Adds a new Node-API docs section under /learn/napi, including Getting Started, Build Tools (node-gyp/CMake.js/node-pre-gyp), and Special Topics pages.

Updates site.json to include the new Node-API group in the Learn sidebar, and tweaks components/Sidebar to normalize routes by stripping /index from metadata.path so navigation links resolve consistently.

Reviewed by Cursor Bugbot for commit de1e72d. Bugbot is set up for automated code reviews on this repo. Configure here.

@vmoroz
Copy link
Copy Markdown
Member

vmoroz commented Apr 24, 2026

We want to avoid the term 'napi' to use in future. Is it possible to name the folder 'node-api'?
Adding @legendecas who is currently driving the Node-API effort,

@vmoroz vmoroz requested a review from legendecas April 24, 2026 21:23
Copy link
Copy Markdown
Member

@gengjiawen gengjiawen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good work

@legendecas
Copy link
Copy Markdown
Member

We want to avoid the term 'napi' to use in future. Is it possible to name the folder 'node-api'?

I think we should prefer node-api or n-api (as in https://nodejs.org/docs/latest/api/n-api.html) for consistency. napi should be avoided if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants