Host the NodeJS Agent docs on the website - #898
Merged
Conversation
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.
✅ Deploy Preview for skywalking-website-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
skywalking-nodejsmoved its user documentation intodocs/with amenu.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
Nextmaster(0.10.0-dev)Latestbf5dc680.9.0-docsv0.9.0bf5dc680.9.0-docsbf5dc68sits on the0.9.0-docsbranch, which is thev0.9.0tag 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, theSW_AGENT_*RUNTIME_METRICS*options, the comma-separated backend-address claim — so the snapshot documents the agent users actually run rather than master.Latestandv0.9.0share a commitId, which is what letsseo/doc-canonical-map.htmlcanonicalise 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:repoUrlis item-level anddocs.jsdoesif (!repoUrl) continue;inside the per-entry loop, so every entry gets run throughdoc.sh. An external-link entry yieldslocalPath = /content/https://github.com/…and then fails atcp ./docs/menu.yml, which underset -o errexitkills the whole build.layouts/projectdoc/baseof.htmlbuilds 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.0tag,docs/contained onlyHow-to-release.md(all user docs were in the rootREADME.md), and the docs card footer already links to the repository.Verification
Full
npm run docs && hugolocally, both exit 0 — 5421 pages, no errors:runtime-metricsappears only undernext, confirming the 0.9.0 snapshot is correctly scoped.One thing to watch
bf5dc68is reachable only as the tip of the0.9.0-docsbranch.doc.shfetches 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.