Anshul Sinha
24dea2348d
doc: clarify explaination text on how to run the example
...
PR-URL: https://github.com/nodejs/node/pull/39020
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-10-06 13:37:31 +00:00
Antoine du Hamel
260092eca3
doc: harmonize fenced code snippet flags
...
We had a few code snippets that were using a non-descriptive tag (e.g.
`console` or `text`), whereas the actual language it's using describes
it better, and improves the syntax highlighting. This commit also
removes non-necessary leading chars (e.g. `$`, `>`, or `%`) to make it
easier for readers to copy and paste to try the command themselves.
PR-URL: https://github.com/nodejs/node/pull/48082
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-05-21 09:36:57 +02:00
Tobias Nießen
895cc572ac
doc: use ASCII apostrophes consistently
...
PR-URL: https://github.com/nodejs/node/pull/43114
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2022-05-17 20:04:51 +01:00
Antoine du Hamel
6afd3fcf65
doc: add node: prefix for all core modules
...
Some core modules can be loaded with or without the `node:` prefix.
Using the prefix disambiguates which specifiers refer to core modules.
This commit updates the docs to use the prefix everywhere a core module
is referenced.
PR-URL: https://github.com/nodejs/node/pull/42752
Fixes: https://github.com/nodejs/node/issues/38343
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Mestery <mestery@protonmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2022-04-20 10:23:41 +02:00
Antoine du Hamel
87325917ec
doc: clarify module system selection
...
Refs: https://github.com/nodejs/node/pull/41345#discussion_r777115823
PR-URL: https://github.com/nodejs/node/pull/41383
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2022-01-17 11:36:19 +01:00
Rich Trott
d0b58c0287
doc: format doc/api/*.md with markdown formatter
...
PR-URL: https://github.com/nodejs/node/pull/40403
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-10-20 11:59:11 +02:00
Rich Trott
0991dfcece
doc: add blank line between comments
...
Upcoming remark-based formatting/linting will add a blank line between
comments in markdown. This is in preparation for that change.
PR-URL: https://github.com/nodejs/node/pull/40160
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-09-21 18:40:04 -07:00
foxxyz
6fdd5827f0
doc: anchor link parity between markdown and html-generated docs
...
Main changes:
- Replace current HTML anchor generation to match
header anchor generation in Github markdown.
- Remove unnecessary double namespacing on generated anchors/links (E.G.
`esm.md#loaders` instead of `esm.md#esm_loaders`).
- Anchors/links are automatically prefixed with their respective modules
when concatenated for usage in `all.html`.
Benefits:
- All anchor links within and between markdown API docs actually work.
- Adding new anchor links no longer requires contributors to generate
the HTML docs first to look up the correct anchors.
- Anchors are much shorter.
- All previous anchor links are preserved by generating hidden legacy
anchors.
PR-URL: https://github.com/nodejs/node/pull/39304
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-08-30 00:40:20 +02:00
Antoine du Hamel
ecf5060a42
doc: use .md extension for internal links
...
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 >
2020-10-01 06:19:12 -07:00
Rich Trott
9687348577
doc: replace "this guide" link text with guide title
...
PR-URL: https://github.com/nodejs/node/pull/35283
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-09-24 04:32:43 -07:00
Rich Trott
c205f672e9
doc: use command-line/command line consistently
...
Docs switch between "command line" and "command-line" with no apparent
uniformity. Microsoft Style Guide prescribes "command line" as a noun
and "command-line" as a modifier, which makes a lot of sense to me.
Updating docs as appropriate.
PR-URL: https://github.com/nodejs/node/pull/35198
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-09-17 02:01:07 -07:00
Rich Trott
d1d412b413
doc: use sentence-case for headings in docs
...
PR-URL: https://github.com/nodejs/node/pull/33889
Refs: https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings
Refs: https://docs.microsoft.com/en-us/style-guide/capitalization
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-06-19 08:09:05 -07:00
Rich Trott
fe4d53df51
doc: move Usage and Example to same header level
...
Having Example under Usage in synopsis.md is misleading. That suggests
that the examples will be examples of the CLI usage, but the example
section is mostly about writing a simple web server. Ideally, the Usage
section should be moved to cli.md and the Example section should
constitute a Getting Started or Quick Start page. But for now, make them
equals under a combined header so that the Table of Contents and the
header/layout of the page is not confusing or misleading.
PR-URL: https://github.com/nodejs/node/pull/28570
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-07-09 19:45:20 -07:00
Rich Trott
7105bbc710
doc: improve synopsis.md
...
Many small improvements to synopsis.md to make it more concise, more
clear, and more correct (punctuation, etc.).
PR-URL: https://github.com/nodejs/node/pull/28115
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-06-09 09:20:25 -07:00
Rich Trott
cb9232dd84
doc: remove superfluous filenaming convention
...
It is debatable whether "it is considered good style" in Node.js to use
hypens or underscores to separate words in file names. Node.js has
little to say about that. Remove that material as it is superfluous.
PR-URL: https://github.com/nodejs/node/pull/28089
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-06-08 18:15:05 -07:00
Sam Roberts
64cea5a1ac
doc: sort bottom-of-file markdown links
...
Reapply https://github.com/nodejs/node/pull/12726
It would be nice to have the sort check applied as part of doc testing,
but this change doesn't implement that.
PR-URL: https://github.com/nodejs/node/pull/24679
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-11-28 13:09:31 -08:00
Denis McDonald
6f4721b733
doc: fix typographical issues
...
PR-URL: https://github.com/nodejs/node/pull/23970
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-10-31 01:14:37 +02:00
Mohammed Essehemy
5942a3447a
doc: match program and console output in synopsis.md
...
PR-URL: https://github.com/nodejs/node/pull/23006
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-09-22 00:49:25 +03:00
Vse Mozhet Byt
392d80a617
doc: add missing periods or colons
...
Some other formatting nits were fixed
and some superfluous descriptions were simplified in passing.
PR-URL: https://github.com/nodejs/node/pull/20401
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-05-02 06:17:08 +03:00
Tim O. Peters
4ac7be94f0
doc: be more explicit in the sypnosis
...
Assuming less knowledge on the part of the reader, making it easier
to get start using Node.js.
PR-URL: https://github.com/nodejs/node/pull/17977
Fixes: https://github.com/nodejs/node/issues/17970 ,
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2018-02-07 15:06:14 +01:00
Jeremiah Senkpiel
ce38c49fb8
doc: not all example code can be run without 1:1
...
PR-URL: https://github.com/nodejs/node/pull/17702
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
2017-12-18 10:26:13 -05:00
Rich Trott
ce6c7f5b01
doc: change v8 to V8
...
Google's V8 engine is styled "V8" and not "v8". Most Node.js docs style
it correctly. This change fixes a few instances that are not styled
correctly.
PR-URL: https://github.com/nodejs/node/pull/17089
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-11-18 22:25:05 +01:00
Chris Young
cacce304cb
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: https://github.com/nodejs/node/pull/10958
Fixes: https://github.com/nodejs/node/issues/10726
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-08-28 11:17:08 +02:00
Ebrahim Byagowi
594b5d7b89
cmd: support dash as stdin alias
...
PR-URL: https://github.com/nodejs/node/pull/13012
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-05-23 20:41:13 +02:00
Сковорода Никита Андреевич
a58b48bc3b
doc: various documentation formatting fixes
...
* Fix markdown code sample in releases.md, it was <a id="x.y.x></a>"
* Fix some markdown errors, e.g. in changelogs
* Fix broken defs links, e.g. in domain-postmortem.md
* Fix other broken refs, by addaleax
* Add links to some defs that were present but not linked to
* Remove dead defs
* Move defs to the bottom (one file affected)
* Add language indicators to all code blocks, using `txt` when no
specific language could be chosen
* Some minor formatting changes (spaces, ident, headings)
PR-URL: https://github.com/nodejs/node/pull/7637
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-07-14 12:26:50 +03:00
Rich Trott
f1cd33c3af
doc: use Node.js in synopsis document
...
Change an instance of `Node` in the synopsis document to `Node.js.`
PR-URL: https://github.com/nodejs/node/pull/6476
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2016-05-01 13:28:34 -07:00
Jeremiah Senkpiel
739f228f1b
doc: better example & synopsis
...
PR-URL: https://github.com/nodejs/node/pull/6167
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Robert Jefe Lindstädt <robert.lindstaedt@gmail.com >
2016-04-29 13:26:30 -04:00
Robert Jefe Lindstaedt
0800c0aa72
doc: git mv to .md
...
* doc: rename .markdown references in content
* doc: rename to .md in tools
* doc: rename to .md in CONTRIBUTING.md
PR-URL: https://github.com/nodejs/node/pull/4747
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: techjeffharris
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2016-04-20 16:34:27 -07:00