Skip to content

Commit feeff48

Browse files
Chris YoungMylesBorins
Chris Young
authored andcommitted
doc: add links to alternative versions of doc
Each page of the API documentation should have links to other versions of the same page. This will make it easier to switch between the current "live" release at nodejs.org and LTS versions. PR-URL: #10958 Fixes: #10726 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent a524285 commit feeff48

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+197
-6
lines changed

doc/api/addons.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# C++ Addons
22

3+
<!--introduced_in=v0.10.0-->
4+
35
Node.js Addons are dynamically-linked shared objects, written in C++, that
46
can be loaded into Node.js using the [`require()`][require] function, and used
57
just as if they were an ordinary Node.js module. They are used primarily to

doc/api/assert.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Assert
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
The `assert` module provides a simple set of assertion tests that can be used to

doc/api/buffer.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Buffer
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
Prior to the introduction of [`TypedArray`] in ECMAScript 2015 (ES6), the

doc/api/child_process.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Child Process
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
The `child_process` module provides the ability to spawn child processes in

doc/api/cli.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Command Line Options
22

3+
<!--introduced_in=v5.9.1-->
34
<!--type=misc-->
45

56
Node.js comes with a variety of CLI options. These options expose built-in

doc/api/cluster.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Cluster
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
A single instance of Node.js runs in a single thread. To take advantage of

doc/api/console.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Console
22

3+
<!--introduced_in=v0.10.13-->
4+
35
> Stability: 2 - Stable
46
57
The `console` module provides a simple debugging console that is similar to the

doc/api/crypto.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Crypto
22

3+
<!--introduced_in=v0.3.6-->
4+
35
> Stability: 2 - Stable
46
57
The `crypto` module provides cryptographic functionality that includes a set of

doc/api/debugger.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Debugger
22

3+
<!--introduced_in=v0.9.12-->
4+
35
> Stability: 2 - Stable
46
57
<!-- type=misc -->

doc/api/dgram.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# UDP / Datagram Sockets
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
<!-- name=dgram -->

doc/api/dns.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# DNS
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
The `dns` module contains functions belonging to two different categories:

doc/api/documentation.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# About this Documentation
22

3+
<!--introduced_in=v0.10.0-->
34
<!-- type=misc -->
45

56
The goal of this documentation is to comprehensively explain the Node.js

doc/api/domain.md

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ changes:
77
the first promise of a chain was created.
88
-->
99

10+
<!--introduced_in=v0.10.0-->
11+
1012
> Stability: 0 - Deprecated
1113
1214
**This module is pending deprecation**. Once a replacement API has been

doc/api/errors.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Errors
22

3+
<!--introduced_in=v4.0.0-->
34
<!--type=misc-->
45

56
Applications running in Node.js will generally experience four categories of

doc/api/events.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Events
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
<!--type=module-->

doc/api/fs.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# File System
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
<!--name=fs-->

doc/api/globals.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Global Objects
22

3+
<!--introduced_in=v0.10.0-->
34
<!-- type=misc -->
45

56
These objects are available in all modules. The following variables may appear

doc/api/http.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# HTTP
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
To use the HTTP server and client one must `require('http')`.

doc/api/https.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# HTTPS
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a

doc/api/modules.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Modules
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
<!--name=module-->

doc/api/net.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Net
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
The `net` module provides an asynchronous network API for creating stream-based

doc/api/os.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# OS
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
The `os` module provides a number of operating system-related utility methods.

doc/api/path.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Path
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
The `path` module provides utilities for working with file and directory paths.

doc/api/process.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Process
22

3+
<!-- introduced_in=v0.10.0 -->
34
<!-- type=global -->
45

56
The `process` object is a `global` that provides information about, and control

doc/api/punycode.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ changes:
66
description: Accessing this module will now emit a deprecation warning.
77
-->
88

9+
<!--introduced_in=v0.10.0-->
10+
911
> Stability: 0 - Deprecated
1012
1113
**The version of the punycode module bundled in Node.js is being deprecated**.

doc/api/querystring.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Query String
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
<!--name=querystring-->

doc/api/readline.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Readline
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
The `readline` module provides an interface for reading data from a [Readable][]

doc/api/repl.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# REPL
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
The `repl` module provides a Read-Eval-Print-Loop (REPL) implementation that

doc/api/stream.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Stream
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
A stream is an abstract interface for working with streaming data in Node.js.

doc/api/string_decoder.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# String Decoder
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
The `string_decoder` module provides an API for decoding `Buffer` objects into

doc/api/synopsis.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Usage
22

3+
<!--introduced_in=v0.10.0-->
34
<!--type=misc-->
45

56
`node [options] [v8 options] [script.js | -e "script" | - ] [arguments]`

doc/api/timers.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Timers
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
The `timer` module exposes a global API for scheduling functions to

doc/api/tls.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# TLS (SSL)
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
The `tls` module provides an implementation of the Transport Layer Security

doc/api/tty.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# TTY
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
The `tty` module provides the `tty.ReadStream` and `tty.WriteStream` classes.

doc/api/url.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# URL
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
The `url` module provides utilities for URL resolution and parsing. It can be

doc/api/util.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Util
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
The `util` module is primarily designed to support the needs of Node.js' own

doc/api/v8.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# V8
22

3+
<!--introduced_in=v4.0.0-->
4+
35
The `v8` module exposes APIs that are specific to the version of [V8][]
46
built into the Node.js binary. It can be accessed using:
57

doc/api/vm.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# VM (Executing JavaScript)
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
<!--name=vm-->

doc/api/zlib.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Zlib
22

3+
<!--introduced_in=v0.10.0-->
4+
35
> Stability: 2 - Stable
46
57
The `zlib` module provides compression functionality implemented using Gzip and

doc/api_assets/style.css

+58
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,61 @@ em code {
8181

8282
#gtoc {
8383
font-size: .8em;
84+
margin-bottom: 1em;
85+
}
86+
87+
#gtoc ul {
88+
list-style: none;
89+
margin-left: 0;
90+
}
91+
92+
#gtoc li {
93+
display: inline;
94+
}
95+
96+
li.version-picker {
97+
position: relative;
98+
}
99+
100+
li.version-picker:hover > ol {
101+
display: block;
102+
}
103+
104+
li.version-picker a span {
105+
font-size: .7em;
106+
}
107+
108+
ol.version-picker {
109+
background: #fff;
110+
border: 1px #43853d solid;
111+
border-radius: 2px;
112+
display: none;
113+
list-style: none;
114+
position: absolute;
115+
right: -2px;
116+
width: 101%;
117+
}
118+
119+
#gtoc ol.version-picker li {
120+
display: block;
121+
}
122+
123+
ol.version-picker li a {
124+
border-radius: 0;
125+
display: block;
126+
margin: 0;
127+
padding: .1em;
128+
padding-left: 1em;
129+
}
130+
131+
ol.version-picker li:first-child a {
132+
border-top-right-radius: 1px;
133+
border-top-left-radius: 1px;
134+
}
135+
136+
ol.version-picker li:last-child a {
137+
border-bottom-right-radius: 1px;
138+
border-bottom-left-radius: 1px;
84139
}
85140

86141
.line {
@@ -507,6 +562,9 @@ th > *:last-child, td > *:last-child {
507562
#content {
508563
font-size: 3.5em;
509564
}
565+
#gtoc {
566+
font-size: 0.6em;
567+
}
510568
}
511569

512570
@media print {

0 commit comments

Comments
 (0)