Skip to content

Commit 08fc220

Browse files
committed
Merge branch 'main' into update-zig-to-0.12
2 parents 4742412 + 6512f29 commit 08fc220

30 files changed

+230
-18
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
1515
- name: Set up Ruby
16-
uses: ruby/setup-ruby@d5fb7a202fc07872cb44f00ba8e6197b70cb0c55 # v1.179.0
16+
uses: ruby/setup-ruby@ff740bc00a01b3a50fffc55a1071b1060eeae9dc # v1.180.0
1717
with:
1818
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
1919
- name: Run tests

.github/workflows/schedule-doc-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
1313
- name: Set up Ruby
14-
uses: ruby/setup-ruby@d5fb7a202fc07872cb44f00ba8e6197b70cb0c55 # v1.179.0
14+
uses: ruby/setup-ruby@ff740bc00a01b3a50fffc55a1071b1060eeae9dc # v1.180.0
1515
with:
1616
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
1717
- name: Generate report

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
1313
- name: Set up Ruby
14-
uses: ruby/setup-ruby@d5fb7a202fc07872cb44f00ba8e6197b70cb0c55 # v1.179.0
14+
uses: ruby/setup-ruby@ff740bc00a01b3a50fffc55a1071b1060eeae9dc # v1.180.0
1515
with:
1616
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
1717
- name: Run tests

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (7.1.3.3)
4+
activesupport (7.1.3.4)
55
base64
66
bigdecimal
77
concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -125,7 +125,7 @@ GEM
125125
strings-ansi (0.2.0)
126126
terminal-table (3.0.2)
127127
unicode-display_width (>= 1.1.1, < 3)
128-
terser (1.2.2)
128+
terser (1.2.3)
129129
execjs (>= 0.3.0, < 3)
130130
thin (1.8.2)
131131
daemons (~> 1.0, >= 1.0.9)

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ Made something cool? Feel free to open a PR to add a new row to this table! You
172172
| [mohamed3nan/DevDocs-Tab](https://github.com/mohamed3nan/DevDocs-Tab) | VS Code extension (view as tab) | ![Latest GitHub commit](https://img.shields.io/github/last-commit/mohamed3nan/DevDocs-Tab?logo=github&label) | ![GitHub stars](https://img.shields.io/github/stars/mohamed3nan/DevDocs-Tab?logo=github&label) |
173173
| [deibit/vscode-devdocs](https://marketplace.visualstudio.com/items?itemName=deibit.devdocs) | VS Code extension (open the browser) | ![Latest GitHub commit](https://img.shields.io/github/last-commit/deibit/vscode-devdocs?logo=github&label) | ![GitHub stars](https://img.shields.io/github/stars/deibit/vscode-devdocs?logo=github&label) |
174174
| [mdh34/quickDocs](https://github.com/mdh34/quickDocs) | Vala/Python based viewer | ![Latest GitHub commit](https://img.shields.io/github/last-commit/mdh34/quickDocs?logo=github&label) | ![GitHub stars](https://img.shields.io/github/stars/mdh34/quickDocs?logo=github&label) |
175+
| [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) |
175176
| [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) |
176177
| [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) |
177178
| [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) |

assets/javascripts/news.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
[
2+
[
3+
"2024-02-20",
4+
"New documentations: <a href=\"/nextjs/\">Next.js</a>, <a href=\"/click/\">click</a>"
5+
],
26
[
37
"2024-01-24",
48
"New documentation: <a href=\"/playwright/\">Playwright</a>"

lib/docs/filters/click/entries.rb

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
module Docs
2+
class Click
3+
class EntriesFilter < Docs::EntriesFilter
4+
TYPE_BY_SLUG = {}
5+
6+
def call
7+
if root_page?
8+
css('section').each do |node|
9+
next if ['documentation', 'api-reference'].include?(node['id'])
10+
type = node.at_css('h2').content.strip
11+
node.css('li > a').each do |toclink|
12+
slug = toclink['href'].split('/')[-2]
13+
TYPE_BY_SLUG[slug] = type
14+
end
15+
end
16+
end
17+
super
18+
end
19+
20+
def get_name
21+
return at_css('h1').content.strip
22+
end
23+
24+
def get_type
25+
TYPE_BY_SLUG[slug.split('/').first] || at_css('h1').content.strip
26+
end
27+
28+
def include_default_entry?
29+
TYPE_BY_SLUG.include?(slug.split('/').first)
30+
end
31+
32+
def additional_entries
33+
return [] if root_page? || TYPE_BY_SLUG.include?(slug.split('/').first)
34+
35+
if slug == 'api/'
36+
entries = []
37+
doc.css('> section').each do |section|
38+
title = section.at_css('h2').content.strip
39+
section.css('dl.py > dt[id]').each do |dt|
40+
name = dt['id'].split('.')[1..].join('.')
41+
name << '()' if dt.parent.classes.intersect?(['function', 'method', 'classmethod', 'staticmethod'])
42+
entries << [name, dt['id'], title]
43+
end
44+
end
45+
return entries
46+
end
47+
48+
(doc.css('> section') || []).map do |section|
49+
title = section.at_css('h2').content.strip
50+
[title, section['id']]
51+
end
52+
end
53+
54+
private
55+
56+
end
57+
end
58+
end
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module Docs
2+
class Click
3+
class PreCleanHtmlFilter < Filter
4+
def call
5+
# Remove ¶ character from headers
6+
css('.headerlink').remove
7+
doc
8+
end
9+
end
10+
end
11+
end

lib/docs/filters/elisp/entries.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module Docs
22
class Elisp
33
class EntriesFilter < Docs::EntriesFilter
44
def get_name
5-
# remove numbers at the beginnig
5+
# remove numbers at the beginning
66
name = at_css('.chapter', '.section', '.subsection', '.subsubsection', '.appendix').content.slice(/[[:alpha:]]...*/)
77

88
# remove 'Appendix' word

lib/docs/filters/gtk/entries.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class EntriesFilter < Docs::EntriesFilter
44
# The GTK documentation paths are "flat" and while the contents of each
55
# page provides a way to determine the direct parent relationship, we
66
# really need a full hierarchy of pages *a priori* to be able to fully
7-
# categorize all pages and entries. So we're going to recursivly generate
7+
# categorize all pages and entries. So we're going to recursively generate
88
# a full map of page -> parent relationships from the table of contents...
99
PARENT_BY_PATH = {}
1010

0 commit comments

Comments
 (0)