summaryrefslogtreecommitdiff
path: root/tools/doc/html.js
Commit message (Collapse)AuthorAgeFilesLines
* tools: update doctool dependencies, migrate to ESMMichaël Zasso2021-06-141-498/+0
| | | | | | | | | | | | | | | | | | | - Migrated to ESM because some dependencies now require it. - Did not update `highlight.js` to v11 because it has many breaking changes. - Used non-deprecated `highlight.js` API. Refs: https://github.com/highlightjs/highlight.js/issues/2277 Fixes: https://github.com/nodejs/node/issues/38938 Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: https://github.com/nodejs/node/pull/38966 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
* tools: relax max-len lint rule for template stringsRich Trott2021-04-071-18/+10
| | | | | | | | | | | | Splitting template strings across multiple lines can make them harder to read. PR-URL: https://github.com/nodejs/node/pull/38097 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* tools,doc: add "legacy" badge in the TOCAntoine du Hamel2021-04-011-3/+3
| | | | | | PR-URL: https://github.com/nodejs/node/pull/37949 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
* doc,tools: use only one level 1 header per pageRich Trott2021-03-251-4/+13
| | | | | | | | | | | | | | | Increment the header levels from markdown files when producing HTML documents. This is both better semantically (as the two h1 headers in current docs are not actually equivalent level semantically--the second belongs below/inside the first) and better for accessibility. (It is valid HTML to have multiple h1 headers in a document, but it can be bad for screen reader experience.) PR-URL: https://github.com/nodejs/node/pull/37839 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Pooja D P <Pooja.D.P@ibm.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
* tools,doc: add support for several flavors of JS code snippetsAntoine du Hamel2021-03-061-9/+40
| | | | | | | | | | | Enable code example using both modern ESM syntax and legacy CJS syntax. It adds a toggle on the web interface to let users switch from one JavaScript flavor to the other. PR-URL: https://github.com/nodejs/node/pull/37162 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
* doc: optimize HTML renderingAntoine du Hamel2021-02-151-1/+13
| | | | | | | | | Defer rendering sections of docs until they are displayed on the user's screen. PR-URL: https://github.com/nodejs/node/pull/37301 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* tools: avoid pending deprecation in doc generatorMichaël Zasso2021-02-121-2/+7
| | | | | | | | | | | | | | `unist-util-find` depends on `lodash.iteratee` which uses `process.binding()`. Let's remove this dependency which is used in one place to do a very simple thing. PR-URL: https://github.com/nodejs/node/pull/37267 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
* doc: remove TOC summary for pages with no TOCRich Trott2021-01-311-7/+13
| | | | | | | | Remove the table of contents summary for pages with no table of contents. Currently, this affects at least index.html. PR-URL: https://github.com/nodejs/node/pull/37043 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
* tools: update stability index linking logicRich Trott2020-11-301-1/+1
| | | | | | | | Fix logic that prevents stability index text from linking to itself. PR-URL: https://github.com/nodejs/node/pull/36280 Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
* tools: update doc tools to remark-parse@9.0.0Rich Trott2020-11-121-0/+4
| | | | | | PR-URL: https://github.com/nodejs/node/pull/36049 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
* doc: use .md extension for internal linksAntoine du Hamel2020-10-011-1/+3
| | | | | | | | | | | | | This helps catch broken links as part of the test suite. This also improves the user experience when browsing the markdown files. PR-URL: https://github.com/nodejs/node/pull/35191 Fixes: https://github.com/nodejs/node/issues/35189 Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* tools,doc: upgrade dependenciesAntoine du Hamel2020-09-221-3/+3
| | | | | | PR-URL: https://github.com/nodejs/node/pull/35244 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com>
* doc: remove problematic auto-linking of curl man pagesRich Trott2020-09-151-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | The only instance of curl man page linking is in repl.md and it is explicit. The magic autolinking in html.js creates a superfluous empty link. Remove it. Before, two adjacent links generated, with the first one having no text: ```html <a href="https://curl.haxx.se/docs/manpage.html"></a> <a href="https://curl.haxx.se/docs/manpage.html"><code>curl(1)</code></a> ``` After, just one link: ```html <a href="https://curl.haxx.se/docs/manpage.html"><code>curl(1)</code></a> ``` PR-URL: https://github.com/nodejs/node/pull/35174 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Coe <bencoe@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* doc: refactor deprecation anchorsAntoine du HAMEL2020-09-041-1/+12
| | | | | | PR-URL: https://github.com/nodejs/node/pull/34955 Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is> Reviewed-By: Rich Trott <rtrott@gmail.com>
* tools,doc: allow page titles to contain inline codeAntoine du HAMEL2020-09-031-5/+7
| | | | | | | | | Previously the HTML title would be cut to the first text node only. PR-URL: https://github.com/nodejs/node/pull/35003 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
* tools,doc: fix global table of content active elementAntoine du Hamel2020-09-031-1/+1
| | | | | | | | | | | Assign active class to the correct HTML element when one nav-id is a subset of another one (E.G.: `nav-module` and `nav-modules`). Fixes: https://github.com/nodejs/node/issues/34975 PR-URL: https://github.com/nodejs/node/pull/34976 Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is> Reviewed-By: Zeyu Yang <himself65@outlook.com>
* doc,tools: remove malfunctioning Linux manpage linkerRich Trott2020-09-021-5/+0
| | | | | | | | | | | The Linux manpage auto-linking is resulting in extraneous links with empty text in the docs. Remove it as the only thing it affects is linked explicitly in the one document that uses it. PR-URL: https://github.com/nodejs/node/pull/34985 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Mary Marchini <oss@mmarchini.me>
* doc,tools: syntax highlight api docs at compile-timeFrancisco Ryan Tolmasky I2020-07-161-0/+16
| | | | | | | | | | | | | Prior to this commit, API docs would be highlighted after the page loaded using `highlightjs`. This commit still uses `highlightjs`, but runs the generation during the compilation of the documentation, making it so no script needs to load on the client. This results in a faster load, as well as allowing the pages to fully functional even when JavaScript is turned off. PR-URL: https://github.com/nodejs/node/pull/34148 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
* doc: add dynamic source code linksAlec Davidson2020-06-261-2/+5
| | | | | | | | Fixes: https://github.com/nodejs/node/pull/33977 PR-URL: https://github.com/nodejs/node/pull/33996 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* tools: remove unused code in doc generation toolRich Trott2020-04-231-13/+1
| | | | | | | | | | | | | | | | | tools/doc/html.js includes code that looks for comments with `start-include` and `end-include` for file inclusion. This seems to be legacy code that is no longer used. The code only appears in the table-of-contents generation function. The strings `start-include` and `end-include` appear nowhere else in our tools and nowhere at all in our docs. PR-URL: https://github.com/nodejs/node/pull/32913 Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* tools: only fetch previous versions when necessaryRichard Lau2020-03-311-5/+3
| | | | | | | | | | | | | | Refactor the logic for working out the previous versions of Node.js for the API documentation so that the parsing (including the potential https get) happens at most once per build (as opposed to the current once per generated API doc). Signed-off-by: Richard Lau <riclau@uk.ibm.com> PR-URL: https://github.com/nodejs/node/pull/32518 Fixes: https://github.com/nodejs/node/issues/32512 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
* test: fix flaky doctool and testRich Trott2019-10-151-2/+2
| | | | | | | | | | | | | Doctool tests have been failing a lot in CI on Win2008 R2. It appears async functions and callback-based functions are being used in combination such that the callback-based function cannot guarantee that it will invoke its callback. Convert the callback-based functions to async functions so we have one paradigm and reliable results. PR-URL: https://github.com/nodejs/node/pull/29979 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
* doc,tools: get altDocs versions from CHANGELOG.mdRichard Lau2019-06-011-16/+5
| | | | | | | | | Parse `CHANGELOG.md` for versions of Node.js used by the documentation feature `View another version` so that we don't have to manually update the list when we cut a new version or transition a release to LTS. PR-URL: https://github.com/nodejs/node/pull/27661 Reviewed-By: Rich Trott <rtrott@gmail.com>
* doc,tools: updates for 6.x End-of-LifeRichard Lau2019-05-141-1/+1
| | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/27658 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
* tools: add `12.x` to alternative docs versionsRichard Lau2019-05-141-0/+1
| | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/27658 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
* tools,doc: fix 404 broken links in docsGerson Niño2019-04-201-0/+10
| | | | | | | | | | Change the `linkManPages()` function to catch the `uname` and `curl` correct websites on the docs page. PR-URL: https://github.com/nodejs/node/pull/27168 Fixes: https://github.com/nodejs/node/issues/26074 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
* tools: update to mdast-util-to-hast v3.0.2Sam Ruby2019-03-101-21/+1
| | | | | | | | | | | | See https://github.com/syntax-tree/mdast-util-to-hast/pull/21 Note: I updated all of the tools/doc dependencies, not just this one, and removed the previous workaround that was in place until this change landed. PR-URL: https://github.com/nodejs/node/pull/22140 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
* benchmark,doc,lib,test: capitalize commentsRuben Bridgewater2019-03-101-2/+2
| | | | | | PR-URL: https://github.com/nodejs/node/pull/26483 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
* tools: refactor tools JS codeRich Trott2019-03-041-1/+1
| | | | | | | | | | | | * standardize on arrow functions for callbacks * standaradize on trailing commas for multiline arrays PR-URL: https://github.com/nodejs/node/pull/26394 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
* doc,lib,test: capitalize comment sentencesRuben Bridgewater2018-12-171-1/+1
| | | | | | | | | | | This activates the eslint capitalize comment rule for comments above 50 characters. PR-URL: https://github.com/nodejs/node/pull/24996 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* tools,doc: fix version picker bug in html.jsRich Trott2018-11-271-0/+1
| | | | | | | | | | | | | | | The processing of strings like `8.x` into a major version number and a minor version number results in minor versions that are `NaN`. In that situation, since the picker will link to the latest docs in the major version, include the version in the version picker. Fixes: https://github.com/nodejs/node/issues/23979 PR-URL: https://github.com/nodejs/node/pull/24638 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
* tools: update alternative docs versionsRichard Lau2018-11-021-1/+2
| | | | | | | | | | Add `11.x` and mark `10.x` as `lts`. PR-URL: https://github.com/nodejs/node/pull/23980 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* doc: remove GA trackingBen Noordhuis2018-10-041-25/+1
| | | | | | | | | | | | | | | | | The Google Analytics tracking wasn't wholly uncontroversial and hasn't been used in practice. Remove it. PR-URL: https://github.com/nodejs/node/pull/23083 Fixes: https://github.com/nodejs/node/issues/22652 Refs: https://github.com/nodejs/node/pull/6601 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
* tools: fix doc tool behavior for version arraysTobias Nießen2018-09-121-3/+11
| | | | | | | | | | | | Even though the doc tool supports version arrays in theory, it fails to sort them properly causing the tool to crash. PR-URL: https://github.com/nodejs/node/pull/22766 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
* doc: Remove 'dnt_helper.js'MaleDong2018-09-021-3/+11
| | | | | | | | | | This file is totally useless, because it's an inner-used helper that is for publishment of doc files. PR-URL: https://github.com/nodejs/node/pull/22595 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* tools: Include links to source code in documentationSam Ruby2018-08-291-1/+6
| | | | | | | | | | | | | | | | Parse source code using acorn; extracting exports. When producing documentation, match exports to headers. When a match is found, add a [src] link. This first commit handles simple exported classes and functions, and does so without requiring any changes to the source code or markdown. Subsequent commits will attempt to match more headers, and some of these changes are likely to require changes to the source code and/or markdown. PR-URL: https://github.com/nodejs/node/pull/22405 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
* doc: support 'removed' field in doc YAML sectionsSarat Addepalli2018-08-261-1/+9
| | | | | | PR-URL: https://github.com/nodejs/node/pull/22100 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
* tools: fix header escaping regressionSam Ruby2018-08-131-1/+4
| | | | | | | | | | | | | quick fix for #22065 Preferred long term fix can be found at: https://github.com/nodejs/node/pull/22140 PR-URL: https://github.com/nodejs/node/pull/22084 Fixes: https://github.com/nodejs/node/issues/22065 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
* tools: do not autolink section to itselfVse Mozhet Byt2018-08-081-2/+2
| | | | | | | | | | | Fix a regression in the new doc generation toolchain. PR-URL: https://github.com/nodejs/node/pull/22138 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sam Ruby <rubys@intertwingly.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
* tools: flatten apidoc headersSam Ruby2018-07-261-6/+21
| | | | | | | | | | | | | | | | ensure optional parameters are not treated as markedown links by replacing the children of headers nodes with a single text node containing the raw markup; Fixes issue identified in https://github.com/nodejs/node/pull/21490#issuecomment-406859983 PR-URL: https://github.com/nodejs/node/pull/21936 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
* tools: produce JSON documentation using unified/remark/rehypeSam Ruby2018-07-251-17/+8
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/21697 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
* tools: build API TOC using raw headersSam Ruby2018-07-211-2/+4
| | | | | | | | | | | | | | Markdown interprets the syntax for optional arguments as a form of a link, so instead of trying to build up the contents using the node value, use grab the raw original markup instead. Fixes regression noted in https://github.com/nodejs/node/pull/21490#issuecomment-406785023 PR-URL: https://github.com/nodejs/node/pull/21922 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* tools: create HTML docs with unified/remark/rehypeSam Ruby2018-07-201-145/+188
| | | | | | PR-URL: https://github.com/nodejs/node/pull/21490 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* doc: add "Edit on GitHub" linkRich Trott2018-07-131-0/+8
| | | | | | | | | | | | | | | | | | | | | Proof of concept for an "Edit on GitHub" link, inspired by the Serverless docs. One issue is that the link is to the version of the docs on the master branch even if the person was reading a different version of the doc. I don't consider that a big problem, although we can always remove the link if it turns out to be a big problem. I don't think there is a good solution. PRs need to be opened against the master branch generally. Having a bunch of PRs against staging branches is probably not what we want. If there's an update to one version of the doc, there will usually be an update to other versions. PR-URL: https://github.com/nodejs/node/pull/21703 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Roman Reiss <me@silverwind.io>
* tools: build all.json by combining generated JSONSam Ruby2018-07-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: 1) Removed a number of root properties that did not seem relevant: source, desc, and introduced_in. There no longer is a source, and the other two are from the first include and do not reflect the entire API. 2) As with https://github.com/nodejs/node/issues/20100, the current "desc" properties sometimes contained in-page links, other times referenced another page, and often did not match the links in the original HTML or JSON file. I chose to standardize on external links as "desc" values are isolated snippets as opposed to all.html which can be viewed as a standalone and self contained document. 3) Eliminated preprocessing for @include entirely, including the test case for this function. 4) _toc.md was renamed to index.md. 5) index comments no longer appear in embedded TOCs (left hand side column in the generated documentation. PR-URL: https://github.com/nodejs/node/pull/21637 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* n-api: restrict exports by versionKyle Farnung2018-07-051-0/+4
| | | | | | | | | | | | | | | | * Move `napi_get_uv_event_loop` into the `NAPI_VERSION >= 2` section * Move `napi_open_callback_scope`, `napi_close_callback_scope`, `napi_fatal_exception`, `napi_add_env_cleanup_hook`, and `napi_remove_env_cleanup_hook` into the `NAPI_VERSION >= 3` section * Added a missing `added` property to `napi_get_uv_event_loop` in the docs * Added a `napiVersion` property to the docs and updated the parser and generator to use it. * Added usage documentation PR-URL: https://github.com/nodejs/node/pull/19962 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
* doc: removed LTS label from v4 in doc version pickerChris Young2018-05-231-1/+1
| | | | | | | | | | | | | Fixes: https://github.com/nodejs/node/issues/20903 PR-URL: https://github.com/nodejs/node/pull/20904 Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* tools, doc: wrap manpage links in code elementsVse Mozhet Byt2018-05-171-1/+1
| | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/20785 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* tools, doc: fix stability index isssuesVse Mozhet Byt2018-05-171-6/+15
| | | | | | | | | | 1. Do not autolink in doc stability section. 2. Do not add void wrapping elements to docs. PR-URL: https://github.com/nodejs/node/pull/20731 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
* tools: overhaul tools/doc/html.jsVse Mozhet Byt2018-05-141-307/+213
| | | | | PR-URL: https://github.com/nodejs/node/pull/20613 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>