This commit fixes the alignment of the bullet points (green arrow) under
'Node.js <version> documentation' by drawing a triangle in CSS instead
of using an ASCII char.
PR-URL: https://github.com/nodejs/node/pull/52193
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Theme applying logic get loaded and executed in async mode, so often
there is a
delay in applying the proper theme to a page which leads to flicker on
dark theme. Resolved by moving critical logic to the page head
PR-URL: https://github.com/nodejs/node/pull/50942
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
Make the level one header for all the HTML documents use consistent
capitalization style as the documentation itself.
PR-URL: https://github.com/nodejs/node/pull/37837
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
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>
PR-URL: https://github.com/nodejs/node/pull/37044
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
The button for toggling light mode and dark mode has no text display.
Screen readers will read it as simply "button", making it not useful.
Add an aria-label attribute so it gets a better description.
PR-URL: https://github.com/nodejs/node/pull/37031
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Move the script tag for dark mode support inside the body tag.
PR-URL: https://github.com/nodejs/node/pull/36930
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/36313
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
The _name_ attribute is obsolete. Changing it to _id_ in the case of
"toc" would result in a conflict with an existing id. However, there are
no links to "#toc" in our docs. And if there were, it would be more
appropriate to link to the id toc which is the toc for the individual
documents. So remove the anchor name entirely.
PR-URL: https://github.com/nodejs/node/pull/34893
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
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>
Prior to this commit, all <pre> tags were being
highlighted as JavaScript. This has been corrected
to syntax highlight all languages appearing in the
API reference docs. This was accomplished by using
highlight.js instead of SHJS for the frontend lib.
* remove SHJS JavaScript code
* add highlight.js bundle
* fix script tags to reflect replacement
* migrate CSS to use highlight.js classes
* add appropriate documentation
* ensure api_assets README.md stays interal
Fixes: https://github.com/nodejs/node/issues/33363
PR-URL: https://github.com/nodejs/node/pull/33442
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
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>
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>
This makes the docs much more mobile-friendly by adding a viewport meta
tag which makes mobile browers properly scale fonts. Additionally the
font sizes have been cleaned up to use `rem` units where possible. Also
included are some fixes for the version dropdown.
PR-URL: https://github.com/nodejs/node/pull/15660
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
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>
Adds Google Analytics tracking script to all doc pages when
`DOCS_ANALYTICS` is set when running `make`:
```bash
$ DOCS_ANALYTICS=<GOOGLE ANALYTICS ID> make
```
By default (when `DOCS_ANALYTICS` is not set), no tracking scripts are
included.
It respects "Do Not Track" settings end users might have in their
browser.
Also changes make target `doc-upload` from depending on the
`$(TARBALL)` target, to only depend on `doc` directly.
PR-URL: https://github.com/nodejs/node/pull/6601
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/7939
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Node.js(1) does not make sense.
Node(1) would, but this isn’t a `man` page.
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>
- Made scrolling of the sidebar not affect the main page by using a combination
of overflow:hidden and overflow:scroll.
- Changed the scrollbar of the sidebar to be visible again for accessibilty
reasons and removed the indication gradient because it was causing too much
issues.
- In WebKit-based browsers, the scrollbar received custom styling making it
appear to be outside of the sidebar.
- The main content is no longer limited to 702px width, but now uses all
available space.
- Changed the background of the code blocks to a very similar, but neutral
color and made inline blocks the same color.
- Made inline code blocks inside italic sections not italic.
- Simplified styling of api_stability classes by introducing a common class
name for the stability levels.
- Fixed various issues related to the green hover background on links.
- Fixed code box overflow outside the main content area.
- Various minor tweaks to paddings and margins.
- Cleaned up numbers in the stylesheet, removing unnecessary units, decimals
and empty selectors.
PR-URL: https://github.com/nodejs/node/pull/5198
Reviewed-By: James M Snell <jasnell@gmail.com>
- Hide the scrollbar on the TOC on all browsers. It was never the
intention for it to be visible with the scroll indication in place.
A wrapper element with 20px padding was added to accommodate for
hopefully all scrollbar widths as well as to avoid overflowing
content.
- Fixed the scroll indication gradient on Safari, which was caused by
the wrong from-color, which now matches the to-color.
- Fixed a issue in old IE where the TOC didn't render on the correct
position through setting `left: 0` and `top: 0` on it.
PR-URL: https://github.com/nodejs/node/pull/4748
Reviewed-By: James M Snell <jasnell@gmail.com>
- Changed colors to match frontpage as close as possible.
- Links are slightly more horizontally padded as compared before to
accomodate for the hover effect.
- Slightly reduced the scroll indication height on the TOC.
- The main content is now offset using margin instead of the previous
border hack.
- remove empty footer that was rendering a dark bar on the bottom of
each page without any content.
PR-URL: https://github.com/nodejs/node/pull/4621
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
This commit replaces instances of io.js with Node.js, based on the
recent convergence. There are some remaining instances of io.js,
related to build and the installer.
Fixes: https://github.com/nodejs/node/issues/2361
PR-URL: https://github.com/nodejs/node/pull/2367
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
Explicitly specify "https" over "http" for linked CSS. Fixup
indentation and quoting issues.
PR-URL: https://github.com/iojs/io.js/pull/379
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
* updates the styling for the iojs docs
* pulls the processing step for markdown files into
a separate module
* adds the ability to insert comments into the markdown
PR-URL: https://github.com/iojs/io.js/pull/297
Fixes: https://github.com/iojs/iojs.github.io/issues/23
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
- Improved styling of download links.
- index.html#download now redirects to /download/
- Added missing hyphens, and added the missing "and 64-bit" for the Mac
Installer.
* Windows: Many libuv test fixes (Bert Belder)
* Windows: avoid uv_guess_handle crash in when fd < 0 (Bert Belder)
* Map EBUSY and ENOTEMPTY errors (Bert Belder)
* Windows: include syscall in fs errors (Bert Belder)
* Fix fs.watch ENOSYS on Linux kernel version mismatch (Ben Noordhuis)
* Update npm to 1.1.9
- upgrade node-gyp to 0.3.5 (Nathan Rajlich)
- Fixisaacs/npm#2249 Add cache-max and cache-min configs
- Properly redirect across https/http registry requests
- log config usage if undefined key in set function (Kris Windham)
- Add support for os/cpu fields in package.json (Adam Blackburn)
- Automatically node-gyp packages containing a binding.gyp
- Fix failures unpacking in UNC shares
- Never create un-listable directories
- Handle cases where an optionalDependency fails to build
This puts all images in doc/images/ and references them via
http://nodejs.org/images/.
Any complaints about copyright usage etc. can thus be node/joyent's
problem, rather than the problem of a downstream distribution channel.
Conflicts:
Makefile
* http: allow multiple WebSocket RFC6455 headers (Einar Otto Stangvik)
* http: allow multiple WWW-Authenticate headers (Ben Noordhuis)
* windows: support unicode argv and environment variables (Bert Belder)
* tls: mitigate session renegotiation attacks (Ben Noordhuis)
* tcp, pipe: don't assert on uv_accept() errors (Ben Noordhuis)
* tls: Allow establishing secure connection on the existing socket (koichik)
* dgram: handle close of dgram socket before DNS lookup completes (Seth Fitzsimmons)
* windows: Support half-duplex pipes (Igor Zinkovsky)
* build: disable omit-frame-pointer on solaris systems (Dave Pacheco)
* debugger: fix --debug-brk (Ben Noordhuis)
* net: fix large file downloads failing (koichik)
* fs: fix ReadStream failure to read from existing fd (Christopher Jeffrey)
* net: destroy socket on DNS error (Stefan Rusu)
* dtrace: add missing translator (Dave Pacheco)
* unix: don't flush tty on switch to raw mode (Ben Noordhuis)
* windows: reset brightness when reverting to default text color (Bert Belder)
* npm: update to 1.1.1
- Update which, fstream, mkdirp, request, and rimraf
- Fix#2123 Set path properly for lifecycle scripts on windows
- Mark the root as seen, so we don't recurse into it. Fixes#1838. (Martin Cooper)