You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks to @JustinBeckwith's linkinator tool, I was able to pretty easily check our docs to see if any of the links were 404ing. Turns out we currently have 2 404s somewhere in the docs. Here are the links that are 404ing:
At a bare minimum, you could view source on docs/api/all.html and search for these links to identify where they are in the docs.
The tool currently falsely reports all DevTools protocol links as 404ing when they are not actually 404ing. I'll open up an issue on the linkinator repo for that.
http://man7.org/linux/man-pages/man1/curl.1.html this link is in this page https://nodejs.org/api/repl.html, The link is not in the repl.md, maybe we have a bug in generating the html.
I think that maybe we have to do something like this following the snippet logic:
constBSD_ONLY_SYSCALLS=newSet(['lchmod']);constLINUX_DIE_ONLY_SYSCALLS=newSet(['uname']);constHAXX_ONLY_SYSCALLS=newSet(['curl']);constMAN_PAGE=/(^|\s)([a-z.]+)\((\d)([a-z]?)\)/gm;// Handle references to man pages, eg "open(2)" or "lchmod(2)". // Returns modified text, with such refs replaced with HTML links, for example // '<a href="/api/browser/proxy?url=http%3A%2F%2Fman7.org%2Flinux%2Fman-pages%2Fman2%2Fopen.2.html">open(2)</a>'. functionlinkManPages(text){returntext.replace(MAN_PAGE,(match,beginning,name,number,optionalCharacter)=>{// Name consists of lowercase letters, // number is a single digit with an optional lowercase letter. constdisplayAs=`<code>${name}(${number}${optionalCharacter})</code>`;if(BSD_ONLY_SYSCALLS.has(name)){return`${beginning}<a href="/api/browser/proxy?url=https%3A%2F%2Fwww.freebsd.org%2Fcgi%2Fman.cgi%60%3C%2Fspan%3E%20%3Cspan%20class%3D"pl-c1">+`?query=${name}&sektion=${number}">${displayAs}</a>`;}elseif(LINUX_DIE_ONLY_SYSCALLS.has(name)){return`${beginning}<a href="/api/browser/proxy?url=https%3A%2F%2Flinux.die.net%2Fman%2F%60%3C%2Fspan%3E%20%3Cspan%20class%3D"pl-c1">+`${number}/${name}">${displayAs}</a>`;}elseif(HAXX_ONLY_SYSCALLS.has(name)){return`${beginning}<a href="/api/browser/proxy?url=https%3A%2F%2F%3Cspan%20class%3D"pl-s1">${name}.haxx.se/docs/manpage.html">${displayAs}</a>`;}else{return`${beginning}<a href="/api/browser/proxy?url=http%3A%2F%2Fman7.org%2Flinux%2Fman-pages%2Fman%3Cspan%20class%3D"pl-s1">${number}` +`/${name}.${number}${optionalCharacter}.html">${displayAs}</a>`;}});}
If we try this we got:
If everything is ok here, Can I send a PR for this?
Activity
gengjiawen commentedon Feb 14, 2019
http://man7.org/linux/man-pages/man1/curl.1.htmlthis link is in this page https://nodejs.org/api/repl.html, The link is not in therepl.md, maybe we have a bug in generating the html.vsemozhetbyt commentedon Feb 14, 2019
The generation takes place here:
node/tools/doc/html.js
Lines 125 to 142 in 6f64cda
gengjiawen commentedon Feb 14, 2019
Looks like a bug. Filter
curlandunamefor now ?07Gond commentedon Feb 27, 2019
https://linux.die.net/man/3/uname this link is for the https://github.com/nodejs/node/blob/master/doc/api/os.md generated by that snippet too.
I think that maybe we have to do something like this following the snippet logic:
If we try this we got:

If everything is ok here, Can I send a PR for this?
tools,doc: fix 404 broken links in docs
tools,doc: fix 404 broken links in docs