Skip to content

Host the NodeJS Agent docs on the website - #898

Merged
wu-sheng merged 1 commit into
masterfrom
docs/nodejs-website-hosted-docs
Aug 16, 2026
Merged

Host the NodeJS Agent docs on the website#898
wu-sheng merged 1 commit into
masterfrom
docs/nodejs-website-hosted-docs

Conversation

@wu-sheng

Copy link
Copy Markdown
Member

skywalking-nodejs moved its user documentation into docs/ with a menu.yml (apache/skywalking-nodejs#145), so the agent can render on the site like every other Hugo-hosted component instead of linking out to a GitHub tree.

Entries

Version commitId Source
Next master (0.10.0-dev)
Latest bf5dc68 tip of 0.9.0-docs
v0.9.0 bf5dc68 tip of 0.9.0-docs

bf5dc68 sits on the 0.9.0-docs branch, which is the v0.9.0 tag commit (1524588, confirmed ancestor) plus the docs move. A follow-up commit there removes what landed after the release — the Node.js runtime metrics page, the SW_AGENT_*RUNTIME_METRICS* options, the comma-separated backend-address claim — so the snapshot documents the agent users actually run rather than master. Latest and v0.9.0 share a commitId, which is what lets seo/doc-canonical-map.html canonicalise the tagged tree to /latest/.

Why the old GitHub-tree entry is gone rather than kept alongside

It cannot coexist with repoUrl, for two independent reasons:

  • repoUrl is item-level and docs.js does if (!repoUrl) continue; inside the per-entry loop, so every entry gets run through doc.sh. An external-link entry yields localPath = /content/https://github.com/… and then fails at cp ./docs/menu.yml, which under set -o errexit kills the whole build.
  • The version switcher in layouts/projectdoc/baseof.html builds its target by substituting the slug into the current /docs/<repo>/<version>/… path, so it cannot navigate to github.com — the option would 404, then 404 again on its /readme/ fallback.

Nothing is lost: at the v0.9.0 tag, docs/ contained only How-to-release.md (all user docs were in the root README.md), and the docs card footer already links to the repository.

Verification

Full npm run docs && hugo locally, both exit 0 — 5421 pages, no errors:

next     15 pages  runtime-metrics tracing
latest   14 pages  tracing
v0.9.0   14 pages  tracing

runtime-metrics appears only under next, confirming the 0.9.0 snapshot is correctly scoped.

One thing to watch

bf5dc68 is reachable only as the tip of the 0.9.0-docs branch. doc.sh fetches it by bare SHA, so deleting or force-pushing that branch would break the site build. Worth keeping the branch, or tagging the commit so it stays reachable independently.

skywalking-nodejs moved its user documentation into docs/ with a menu.yml
(apache/skywalking-nodejs#145), so the agent can render on the site like
every other Hugo-hosted component instead of linking out to a GitHub tree.

Adds repoUrl and the Next/Latest/v0.9.0 entries. Next tracks master
(0.10.0-dev). Latest and v0.9.0 both pin bf5dc68 on the 0.9.0-docs branch,
which is the v0.9.0 tag commit plus the docs move; a follow-up commit there
removes what landed after the release, so the snapshot documents the agent
users actually run. Sharing one commitId between Latest and v0.9.0 also lets
seo/doc-canonical-map.html point the tagged tree at /latest/.

The old GitHub-tree entry could not be kept alongside these: repoUrl is
item-level, so docs.js runs every entry through doc.sh, and an external link
has no docs/menu.yml to copy. The version switcher likewise builds its target
by substituting the slug into /docs/<repo>/<version>/, so it cannot reach
github.com. Nothing is lost — at v0.9.0 docs/ held only How-to-release.md,
and the docs card already links to the repository.

Verified with a full npm run docs && hugo: 5421 pages, all three trees
rendered, runtime-metrics present only under next.
@netlify

netlify Bot commented Aug 16, 2026

Copy link
Copy Markdown

Deploy Preview for skywalking-website-preview ready!

Name Link
🔨 Latest commit 5de3e82
🔍 Latest deploy log https://app.netlify.com/projects/skywalking-website-preview/deploys/6a81000f937f8b0008fdf706
😎 Deploy Preview https://deploy-preview-898--skywalking-website-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@wu-sheng
wu-sheng merged commit f3bfb8d into master Aug 16, 2026
5 checks passed
@wu-sheng
wu-sheng deleted the docs/nodejs-website-hosted-docs branch August 16, 2026 00:22
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.

1 participant