Skip to content

[pull] main from freeCodeCamp:main #159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 93 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
14d8d3c
switch neovim plugin link to a newer maintained plugin
emmanueltouzery May 2, 2025
a8214b3
Update ruby/setup-ruby action to v1.238.0
renovate[bot] May 8, 2025
bc13ec1
Merge pull request #2493 from freeCodeCamp/renovate/github-actions
renovate[bot] May 8, 2025
78dc054
Update ruby/setup-ruby action to v1.239.0
renovate[bot] May 14, 2025
5c940da
Merge pull request #2496 from freeCodeCamp/renovate/github-actions
renovate[bot] May 15, 2025
c0f79d6
Update dependency ruby to v3.4.4
renovate[bot] May 15, 2025
e51808b
Merge pull request #2495 from freeCodeCamp/renovate/ruby-3.x
renovate[bot] May 15, 2025
eece649
Update ruby Docker tag to v3.4.4
renovate[bot] May 16, 2025
77a36f9
Merge pull request #2497 from freeCodeCamp/renovate/ruby-3.x
renovate[bot] May 16, 2025
b35dc57
Update ruby/setup-ruby action to v1.240.0
renovate[bot] May 16, 2025
a6d985c
Merge pull request #2498 from freeCodeCamp/renovate/github-actions
renovate[bot] May 16, 2025
0fde144
Update ruby/setup-ruby action to v1.241.0
renovate[bot] May 16, 2025
b1c4af4
Merge pull request #2499 from freeCodeCamp/renovate/github-actions
renovate[bot] May 17, 2025
ade1961
Add vertx docs
May 17, 2025
bb8dcec
Update dependency rack to v2.2.15
renovate[bot] May 18, 2025
b6d31ab
Merge pull request #2502 from freeCodeCamp/renovate/rack-2.x-lockfile
renovate[bot] May 18, 2025
42c87bd
Update Leaflet documentation (2.0.0-alpha)
simon04 May 18, 2025
5a09102
Update ruby/setup-ruby action to v1.242.0
renovate[bot] May 18, 2025
2aa7986
Merge pull request #2503 from freeCodeCamp/renovate/github-actions
renovate[bot] May 19, 2025
19696fb
Add version support
May 19, 2025
01aca6c
Add SOURCE for icon and credis
May 19, 2025
03454d6
Update ruby/setup-ruby action to v1.243.0
renovate[bot] May 19, 2025
026f753
Merge pull request #2504 from freeCodeCamp/renovate/github-actions
renovate[bot] May 20, 2025
84ae0b9
Update ruby/setup-ruby action to v1.244.0
renovate[bot] May 21, 2025
b661f68
Merge pull request #2505 from freeCodeCamp/renovate/github-actions
renovate[bot] May 21, 2025
ee318ec
Update dependency rack to v2.2.16
renovate[bot] May 22, 2025
45014cf
Merge pull request #2506 from freeCodeCamp/renovate/rack-2.x-lockfile
ojeytonwilliams May 22, 2025
c6b1fd0
Merge pull request #2490 from emmanueltouzery/new_neovim
simon04 May 28, 2025
e6d8941
Update Vert.x documentation
simon04 May 28, 2025
bc77916
Merge pull request #2500 from dorimon-1/vertx
simon04 May 28, 2025
739b624
Update dependency rake to v13.3.0
renovate[bot] May 30, 2025
7579a06
Merge pull request #2511 from freeCodeCamp/renovate/rake-13.x-lockfile
renovate[bot] May 30, 2025
3794bf6
Change where GitHub scraper gets its JSON. Fix Koa, Q, Sanctuary, and…
spamguy May 29, 2025
f4e2ebd
Update pytorch scraper, include various 2.x versions
blahgeek May 31, 2025
caf8dda
numpy: add new version 2.1 and 2.2
blahgeek May 31, 2025
7542850
update logo
blahgeek May 31, 2025
040082f
Update Koa documentation (3.0.0)
simon04 Jun 1, 2025
4676f84
Merge pull request #2512 from spamguy/github-scraper
simon04 Jun 1, 2025
23ffcc3
pytorch: add redirects
simon04 Jun 1, 2025
fafde1b
Merge pull request #2513 from blahgeek/torch-2.7
simon04 Jun 1, 2025
6f91fc4
Merge pull request #2514 from blahgeek/numpy-2.2
simon04 Jun 1, 2025
0dfc779
Update Axios documentation (1.9.0)
simon04 Jun 1, 2025
3bfddfe
Update Sass documentation (1.89.1)
simon04 Jun 1, 2025
8771abc
Update Octave documentation (10.1.0)
simon04 Jun 1, 2025
a6e3849
Update Rust documentation (1.87.0)
simon04 Jun 1, 2025
c336a0e
Update Kubectl documentation (1.33.1)
simon04 Jun 1, 2025
2560e37
Update Kubernetes documentation (1.33.1)
simon04 Jun 1, 2025
d134b9f
Update PointCloudLibrary documentation (1.15.0)
simon04 Jun 1, 2025
c71b811
Update Node.js documentation (24.1.0)
simon04 Jun 1, 2025
0b5689a
Update Web APIs documentation
simon04 Jun 1, 2025
7784748
Update JavaScript documentation
simon04 Jun 1, 2025
b864fb1
Update CSS documentation
simon04 Jun 1, 2025
6797b57
Update HTML documentation ()
simon04 Jun 1, 2025
de218ca
Update Perl documentation (5.40.2)
simon04 Jun 1, 2025
24a9cbb
Update SQLite documentation (3.50.0)
simon04 Jun 1, 2025
db68e27
Update Jekyll documentation (4.4.1)
simon04 Jun 1, 2025
896f8e0
Update PostgreSQL documentation (17.5)
simon04 Jun 1, 2025
1dc1557
Update Svelte documentation (5.33.11)
simon04 Jun 1, 2025
786a238
Update QUnit documentation (2.24.1)
simon04 Jun 1, 2025
afc9e53
Update Express documentation (5.1.0)
simon04 Jun 1, 2025
93c3c57
es-toolkit scraper
gurgeous Jun 2, 2025
45833e2
Update dependency rack to v2.2.17
renovate[bot] Jun 3, 2025
092fde1
Merge pull request #2518 from freeCodeCamp/renovate/rack-2.x-lockfile
ojeytonwilliams Jun 3, 2025
90fed11
es-toolkit: use U+2063 INVISIBLE SEPARATOR
simon04 Jun 4, 2025
52a9a3d
es-toolkit: attribution link
simon04 Jun 4, 2025
58c4ef9
es-toolkit: add news
simon04 Jun 4, 2025
c4b95a3
Merge pull request #2517 from gurgeous/es-toolkit
simon04 Jun 4, 2025
fe827b3
Implement Zsh scraper
spamguy Jun 3, 2025
5d59c2f
Update ruby/setup-ruby action to v1.245.0
renovate[bot] Jun 11, 2025
83943ee
Merge pull request #2522 from freeCodeCamp/renovate/github-actions
renovate[bot] Jun 12, 2025
ba2f450
Update dependency terser to v1.2.6
renovate[bot] Jun 19, 2025
11f1072
Merge pull request #2524 from freeCodeCamp/renovate/terser-1.x-lockfile
renovate[bot] Jun 19, 2025
2b03580
(ramda) $! make docs generatable again
alexbepple Jun 20, 2025
3111ac2
(ramda) $! correctly determine latest version
alexbepple Jun 20, 2025
d413aab
(ramda) $ specify the only 2 versions that make sense
alexbepple Jun 20, 2025
54d3b88
Add entries for function calls and operators
spamguy Jun 13, 2025
b29a3c8
zsh: add news entry
simon04 Jun 27, 2025
4fb53e1
Merge remote-tracking branch 'origin/main' into zsh
simon04 Jun 27, 2025
fb62266
Merge pull request #2519 from spamguy/zsh
simon04 Jun 27, 2025
57a9f0c
Update Ramda documentation (0.31.3)
simon04 Jun 27, 2025
131007f
Merge pull request #2526 from alexbepple/ramda
simon04 Jun 27, 2025
2a2c11b
Update Rust documentation (1.88.0)
simon04 Jun 27, 2025
0fbfafc
Update nginx documentation (1.29.0)
simon04 Jul 1, 2025
25ac4ef
Update Vite documentation (7.0.0)
simon04 Jul 1, 2025
21927ee
Update Playwright documentation (1.53.2)
simon04 Jul 1, 2025
63e0ed3
Update Astro documentation (5.10.2)
simon04 Jul 1, 2025
9117c2d
Update Git documentation (2.50.0)
simon04 Jul 1, 2025
03bd6a0
Update Prettier documentation (3.6.2)
simon04 Jul 1, 2025
0848782
Update Python documentation (3.13.5)
simon04 Jul 1, 2025
c05928e
Add Tailwind CSS v4 and revise v3
spamguy Jun 27, 2025
fc86e6e
Update Perl documentation (5.42.0)
simon04 Jul 4, 2025
06ce9ee
Update pandas documentation (2.3.0)
simon04 Jul 4, 2025
8b3f552
Merge pull request #2533 from spamguy/tailwind-41
simon04 Jul 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Set up Ruby
uses: ruby/setup-ruby@eaecf785f6a34567a6d97f686bbb7bccc1ac1e5c # v1.237.0
uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1.245.0
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/schedule-doc-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Set up Ruby
uses: ruby/setup-ruby@eaecf785f6a34567a6d97f686bbb7bccc1ac1e5c # v1.237.0
uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1.245.0
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Generate report
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Ruby
uses: ruby/setup-ruby@eaecf785f6a34567a6d97f686bbb7bccc1ac1e5c # v1.237.0
uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1.245.0
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.4.3
3.4.4
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby 3.4.3
ruby 3.4.4
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.4.3
FROM ruby:3.4.4
ENV LANG=C.UTF-8
ENV ENABLE_SERVICE_WORKER=true

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-alpine
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.4.3-alpine
FROM ruby:3.4.4-alpine

ENV LANG=C.UTF-8
ENV ENABLE_SERVICE_WORKER=true
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
source 'https://rubygems.org'
ruby '3.4.3'
ruby '3.4.4'

gem 'activesupport', require: false
gem 'html-pipeline'
Expand Down
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ GEM
byebug (~> 12.0)
pry (>= 0.13, < 0.16)
racc (1.8.1)
rack (2.2.14)
rack (2.2.17)
rack-protection (3.2.0)
base64 (>= 0.1.0)
rack (~> 2.2, >= 2.2.4)
rack-ssl-enforcer (0.2.9)
rack-test (2.2.0)
rack (>= 1.3)
rake (13.2.1)
rake (13.3.0)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
Expand Down Expand Up @@ -130,7 +130,7 @@ GEM
strings-ansi (0.2.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
terser (1.2.5)
terser (1.2.6)
execjs (>= 0.3.0, < 3)
thin (1.8.2)
daemons (~> 1.0, >= 1.0.9)
Expand Down Expand Up @@ -191,7 +191,7 @@ DEPENDENCIES
yajl-ruby

RUBY VERSION
ruby 3.4.3p32
ruby 3.4.4p34

BUNDLED WITH
2.4.6
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ Made something cool? Feel free to open a PR to add a new row to this table! You
| [girishji/devdocs.vim](https://github.com/girishji/devdocs.vim) | Vim plugin & TUI (browse inside Vim) | ![Latest GitHub commit](https://img.shields.io/github/last-commit/girishji/devdocs.vim?logo=github&label) | ![GitHub stars](https://img.shields.io/github/stars/girishji/devdocs.vim?logo=github&label) |
| [romainl/vim-devdocs](https://github.com/romainl/vim-devdocs) | Vim plugin | ![Latest GitHub commit](https://img.shields.io/github/last-commit/romainl/vim-devdocs?logo=github&label) | ![GitHub stars](https://img.shields.io/github/stars/romainl/vim-devdocs?logo=github&label) |
| [waiting-for-dev/vim-www](https://github.com/waiting-for-dev/vim-www) | Vim plugin | ![Latest GitHub commit](https://img.shields.io/github/last-commit/waiting-for-dev/vim-www?logo=github&label) | ![GitHub stars](https://img.shields.io/github/stars/waiting-for-dev/vim-www?logo=github&label) |
| [luckasRanarison/nvim-devdocs](https://github.com/luckasRanarison/nvim-devdocs) | Neovim plugin | ![Latest GitHub commit](https://img.shields.io/github/last-commit/luckasRanarison/nvim-devdocs?logo=github&label) | ![GitHub stars](https://img.shields.io/github/stars/luckasRanarison/nvim-devdocs?logo=github&label) |
| [emmanueltouzery/apidocs.nvim](https://github.com/emmanueltouzery/apidocs.nvim) | Neovim plugin | ![Latest GitHub commit](https://img.shields.io/github/last-commit/emmanueltouzery/apidocs.nvim?logo=github&label) | ![GitHub stars](https://img.shields.io/github/stars/emmanueltouzery/apidocs.nvim?logo=github&label) |
| [toiletbril/dedoc](https://github.com/toiletbril/dedoc) | Terminal based viewer | ![Latest GitHub commit](https://img.shields.io/github/last-commit/toiletbril/dedoc?logo=github&label) | ![GitHub stars](https://img.shields.io/github/stars/toiletbril/dedoc?logo=github&label) |
| [Raycast Devdocs](https://www.raycast.com/djpowers/devdocs) | Raycast extension | Unavailable | Unavailable |
| [chrisgrieser/alfred-docs-searches](https://github.com/chrisgrieser/alfred-docs-searches) | Alfred workflow | ![Latest GitHub commit](https://img.shields.io/github/last-commit/chrisgrieser/alfred-docs-searches?logo=github&label) | ![GitHub stars](https://img.shields.io/github/stars/chrisgrieser/alfred-docs-searches?logo=github&label) |
Expand Down
12 changes: 12 additions & 0 deletions assets/javascripts/news.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
[
[
"2025-06-27",
"New documentation: <a href=\"/zsh/\">Zsh</a>"
],
[
"2025-06-04",
"New documentation: <a href=\"/es_toolkit/\">es-toolkit</a>"
],
[
"2025-05-28",
"New documentation: <a href=\"/vertx/\">Vert.x</a>"
],
[
"2025-02-23",
"New documentation: <a href=\"/threejs/\">Three.js</a>"
Expand Down
5 changes: 5 additions & 0 deletions assets/stylesheets/global/_classes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@
border-color: var(--noteRedBorder);
}

%note-gray, %label-gray {
background: var(--boxBackground);
border: 1px solid var(--boxBorder);
}

//
// External links
//
Expand Down
10 changes: 8 additions & 2 deletions assets/stylesheets/pages/_mdn.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,18 @@

p > code, li > code { @extend %label; }

details { @extend %box; }
details { @extend %note; @extend %box; }
details.baseline-indicator.not { @extend %note; @extend %note-gray; }
details.baseline-indicator.low { @extend %note; @extend %note-blue; }
details.baseline-indicator.high { @extend %note; @extend %note-green; }
summary > div { display: inline; }
summary .status-title { font-weight: bold; }

> .note,
.notecard, // MDN 2021
.notice,
.notice {
@extend %note; @extend %note-blue;
}
.warning,
.overheadIndicator,
.blockIndicator,
Expand Down
6 changes: 6 additions & 0 deletions docs/file-scrapers.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ curl -L https://github.com/erlang/otp/releases/download/OTP-$RELEASE/otp_doc_htm
bsdtar --extract --file - --directory=docs/erlang\~$VERSION/
```

## es-toolkit

```sh
git clone https://github.com/toss/es-toolkit docs/es_toolkit
```

## Gnu

### Bash
Expand Down
2 changes: 2 additions & 0 deletions lib/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,8 @@ def modern_browser?(browser)
'angular~1.3' => 'angularjs~1.3',
'angular~1.2' => 'angularjs~1.2',
'codeigniter~3.0' => 'codeigniter~3',
'pytorch~1' => 'pytorch~1.13',
'pytorch~2' => 'pytorch',
'webpack~2' => 'webpack'
}

Expand Down
6 changes: 3 additions & 3 deletions lib/docs/filters/express/clean_html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ def call
i += 1 while n && n = n.previous_element
at_css('h1')['data-level'] = i

@doc = at_css('#api-doc, .content')
@doc = at_css('#api-doc, main, .content')

css('nav').remove # aria-labelledby="sidebar-heading"

css('section', 'div.highlighter-rouge').each do |node|
node.before(node.children).remove
end

@doc = at_css('#page-doc') unless root_page?

if root_page?
at_css('h1').remove
css('> header', '#menu').remove
Expand Down
5 changes: 5 additions & 0 deletions lib/docs/filters/github/clean_html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ module Docs
class Github
class CleanHtmlFilter < Filter
def call
# Remove h1 wrapper to render it correctly.
css('.markdown-heading h1').each do |node|
node.parent.replace(node)
end

css('.anchor').each do |node|
node.parent['id'] = node['href'].remove('#')
node.remove
Expand Down
19 changes: 10 additions & 9 deletions lib/docs/filters/html/entries.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,22 @@ class EntriesFilter < Docs::EntriesFilter

def get_name
name = super
name.sub!('Element.', '').try(:downcase!)
name.sub!('Global attributes.', '').try(:concat, ' (attribute)')
name.sub!('Guides.', '')
name.sub!('How to.', '')
name.sub!('Reference.Elements.', '').try(:downcase!)
name.sub!('Reference.Attributes.', '').try(:concat, ' (attribute)')
name.sub!('Reference.Global attributes.', '').try(:concat, ' (attribute)')
name.sub!(/input\.([-\w]+)/, 'input type="\1"')
name
end

def get_type
return 'Miscellaneous' if slug.include?('CORS') || slug.include?('Using')

if at_css('.deprecated', '.non-standard', '.obsolete')
'Obsolete'
elsif slug.start_with?('Global_attr')
'Attributes'
elsif slug.start_with?('Element/')
'Elements'
'Obsolete'
elsif slug.start_with?('Guides/')
'Guides'
elsif slug.start_with?('Reference/')
slug.split('/').drop(1).first.sub(/_/, ' ')
else
'Miscellaneous'
end
Expand Down
4 changes: 2 additions & 2 deletions lib/docs/filters/nginx_lua_module/entries.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ class EntriesFilter < Docs::EntriesFilter
def additional_entries
entries = []

css('#directives + ul > li > a').each do |node|
css('h2:contains("Directives") + ul > li > a').each do |node|
entries << [node.content, node['href'].remove('#'), 'Directives']
end

css('#nginx-api-for-lua + ul > li > a').each do |node|
css('h2:contains("Nginx API for Lua") + ul > li > a').each do |node|
next if node.content == 'Introduction'
entries << [node.content, node['href'].remove('#'), 'Nginx API for Lua']
end
Expand Down
80 changes: 2 additions & 78 deletions lib/docs/filters/pytorch/entries.rb
Original file line number Diff line number Diff line change
@@ -1,92 +1,18 @@
module Docs
class Pytorch
class EntriesFilter < Docs::EntriesFilter
TYPE_REPLACEMENTS = {
"torch.Tensor" => "Tensor",
"torch.nn" => "Neuro Network",
"Probability distributions - torch.distributions" => "Probability Distributions",
"torch" => "Torch",
"Quantization" => "Quantization",
"torch.optim" => "Optimization",
"torch.Storage" => "Storage",
"torch.nn.functional" => "NN Functions",
"torch.cuda" => "CUDA",
"Torch Distributed Elastic" => "Distributed Elastic",
"torch.fx" => "FX",
"TorchScript" => "Torch Script",
"torch.onnx" => "ONNX",
"Distributed communication package - torch.distributed" => "Distributed Communication",
"Automatic differentiation package - torch.autograd" => "Automatic Differentiation",
"torch.linalg" => "Linear Algebra",
"Distributed Checkpoint - torch.distributed.checkpoint" => "Distributed Checkpoint",
"Distributed RPC Framework" => "Distributed RPC",
"torch.special" => "SciPy-like Special",
"torch.package" => "Package",
"torch.backends" => "Backends",
"FullyShardedDataParallel" => "Fully Sharded Data Parallel",
"torch.sparse" => "Sparse Tensors",
"torch.export" => "Traced Graph Export",
"torch.fft" => "Discrete Fourier Transforms",
"torch.utils.data" => "Datasets and Data Loaders",
"torch.monitor" => "Monitor",
"Automatic Mixed Precision package - torch.amp" => "Automatic Mixed Precision",
"torch.utils.tensorboard" => "Tensorboard",
"torch.profiler" => "Profiler",
"torch.mps" => "MPS",
"DDP Communication Hooks" => "DDP Communication Hooks",
"Benchmark Utils - torch.utils.benchmark" => "Benchmark Utils",
"torch.nn.init" => "Parameter Initializations",
"Tensor Parallelism - torch.distributed.tensor.parallel" => "Tensor Parallelism",
"torch.func" => "JAX-like Function Transforms",
"Distributed Optimizers" => "Distributed Optimizers",
"torch.signal" => "SciPy-like Signal",
"torch.futures" => "Miscellaneous",
"torch.utils.cpp_extension" => "Miscellaneous",
"torch.overrides" => "Miscellaneous",
"Generic Join Context Manager" => "Miscellaneous",
"torch.hub" => "Miscellaneous",
"torch.cpu" => "Miscellaneous",
"torch.random" => "Miscellaneous",
"torch.compiler" => "Miscellaneous",
"Pipeline Parallelism" => "Miscellaneous",
"Named Tensors" => "Miscellaneous",
"Multiprocessing package - torch.multiprocessing" => "Miscellaneous",
"torch.utils" => "Miscellaneous",
"torch.library" => "Miscellaneous",
"Tensor Attributes" => "Miscellaneous",
"torch.testing" => "Miscellaneous",
"torch.nested" => "Miscellaneous",
"Understanding CUDA Memory Usage" => "Miscellaneous",
"torch.utils.dlpack" => "Miscellaneous",
"torch.utils.checkpoint" => "Miscellaneous",
"torch.__config__" => "Miscellaneous",
"Type Info" => "Miscellaneous",
"torch.utils.model_zoo" => "Miscellaneous",
"torch.utils.mobile_optimizer" => "Miscellaneous",
"torch._logging" => "Miscellaneous",
"torch.masked" => "Miscellaneous",
"torch.utils.bottleneck" => "Miscellaneous"
}

def get_breadcrumbs
css('.pytorch-breadcrumbs > li').map {
|node| node.content.delete_suffix(' >').strip
}.reject { |item| item.nil? || item.empty? }
end

def get_name
b = get_breadcrumbs
b[(b[1] == 'torch' ? 2 : 1)..].join('.')
get_breadcrumbs[-1]
end

def get_type
t = get_breadcrumbs[1]
TYPE_REPLACEMENTS.fetch(t, t)
end

def include_default_entry?
# Only include API entries to simplify and unify the list
return name.start_with?('torch.')
get_breadcrumbs[1]
end

def additional_entries
Expand All @@ -108,8 +34,6 @@ def additional_entries
entries << [id + '()', id]
when 'py class', 'py attribute', 'py property'
entries << [id, id]
when 'footnote brackets', 'field-list simple'
next
end
end

Expand Down
3 changes: 2 additions & 1 deletion lib/docs/filters/qunit/entries.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ class EntriesFilter < Docs::EntriesFilter
'assert' => '2. Assertions',
'callbacks' => '3. Callback events',
'config' => '4. Configuration',
'extension' => '5. Extension interface'
'extension' => '5. Extension interface',
'reporters' => '6. Reporters',
}
def get_name
at_css('h1').content
Expand Down
4 changes: 3 additions & 1 deletion lib/docs/filters/ramda/entries.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ class Ramda
class EntriesFilter < Docs::EntriesFilter
def additional_entries
css('ul.toc li').map do |node|
["R.#{node['data-name']}", node['data-name'], node['data-category'].sub('Relaction', 'Relation')]
# As of 2025-06-20, `data-category` attribute is missing on https://ramdajs.com/ for Ramda versions < 0.29.0.
# This results in missing type for entries – and docs cannot be generated.
["R.#{node['data-name']}", node['data-name'], node['data-category']]
end
end
end
Expand Down
6 changes: 4 additions & 2 deletions lib/docs/filters/rust/entries.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ class EntriesFilter < Docs::EntriesFilter

def get_name
if slug.start_with?('book') || slug.start_with?('reference')
name = at_css("#sidebar a[href='#{File.basename(slug)}']")
name ? name.content : 'Introduction'
name = at_css("h2", "h1")
ch1 = slug[/ch(\d+)-(\d+)/, 1]
ch2 = slug[/ch(\d+)-(\d+)/, 2]
name ? "#{ch1}.#{ch2}. #{name.content}" : 'Introduction'
elsif slug == 'error-index'
'Compiler Errors'
else
Expand Down
4 changes: 3 additions & 1 deletion lib/docs/filters/sanctuary_def/entries.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ def additional_entries
when "h3"
type = node.text
when "h4"
# Parent <div>'s ID set in github/clean_html.
id = node.parent.attributes["id"].value
name = node.text.split(' :: ')[0]
id = node.attributes["id"].value

entries << [name, id, type]
end
end
Expand Down
Loading