Merge branch 'main' into click

pull/2221/head
Simon Legner 7 months ago
commit da447864f1

@ -13,7 +13,7 @@ jobs:
steps: steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Set up Ruby - name: Set up Ruby
uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0 uses: ruby/setup-ruby@ff740bc00a01b3a50fffc55a1071b1060eeae9dc # v1.180.0
with: with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests - name: Run tests

@ -11,7 +11,7 @@ jobs:
steps: steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Set up Ruby - name: Set up Ruby
uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0 uses: ruby/setup-ruby@ff740bc00a01b3a50fffc55a1071b1060eeae9dc # v1.180.0
with: with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Generate report - name: Generate report

@ -11,7 +11,7 @@ jobs:
steps: steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Set up Ruby - name: Set up Ruby
uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0 uses: ruby/setup-ruby@ff740bc00a01b3a50fffc55a1071b1060eeae9dc # v1.180.0
with: with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests - name: Run tests

@ -1 +1 @@
3.3.1 3.3.2

@ -1 +1 @@
ruby 3.3.1 ruby 3.3.2

@ -1,4 +1,4 @@
FROM ruby:3.3.1 FROM ruby:3.3.2
ENV LANG=C.UTF-8 ENV LANG=C.UTF-8
ENV ENABLE_SERVICE_WORKER=true ENV ENABLE_SERVICE_WORKER=true

@ -1,4 +1,4 @@
FROM ruby:3.3.1-alpine FROM ruby:3.3.2-alpine
ENV LANG=C.UTF-8 ENV LANG=C.UTF-8
ENV ENABLE_SERVICE_WORKER=true ENV ENABLE_SERVICE_WORKER=true

@ -1,5 +1,5 @@
source 'https://rubygems.org' source 'https://rubygems.org'
ruby '3.3.1' ruby '3.3.2'
gem 'activesupport', require: false gem 'activesupport', require: false
gem 'html-pipeline' gem 'html-pipeline'

@ -1,7 +1,7 @@
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
activesupport (7.1.3.2) activesupport (7.1.3.4)
base64 base64
bigdecimal bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2) concurrent-ruby (~> 1.0, >= 1.0.2)
@ -16,7 +16,7 @@ GEM
erubi (>= 1.0.0) erubi (>= 1.0.0)
rack (>= 0.9.0) rack (>= 0.9.0)
rouge (>= 1.0.0) rouge (>= 1.0.0)
bigdecimal (3.1.6) bigdecimal (3.1.8)
browser (5.3.1) browser (5.3.1)
byebug (11.1.3) byebug (11.1.3)
chunky_png (1.4.0) chunky_png (1.4.0)
@ -24,8 +24,7 @@ GEM
concurrent-ruby (1.2.3) concurrent-ruby (1.2.3)
connection_pool (2.4.1) connection_pool (2.4.1)
daemons (1.4.1) daemons (1.4.1)
drb (2.2.0) drb (2.2.1)
ruby2_keywords
erubi (1.12.0) erubi (1.12.0)
ethon (0.16.0) ethon (0.16.0)
ffi (>= 1.15.0) ffi (>= 1.15.0)
@ -38,7 +37,7 @@ GEM
html-pipeline (2.14.3) html-pipeline (2.14.3)
activesupport (>= 2) activesupport (>= 2)
nokogiri (>= 1.4) nokogiri (>= 1.4)
i18n (1.14.1) i18n (1.14.5)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
image_optim (0.31.3) image_optim (0.31.3)
exifr (~> 1.2, >= 1.2.2) exifr (~> 1.2, >= 1.2.2)
@ -53,7 +52,7 @@ GEM
in_threads (1.6.0) in_threads (1.6.0)
method_source (1.0.0) method_source (1.0.0)
mini_portile2 (2.8.6) mini_portile2 (2.8.6)
minitest (5.23.0) minitest (5.23.1)
multi_json (1.15.0) multi_json (1.15.0)
mustermann (3.0.0) mustermann (3.0.0)
ruby2_keywords (~> 0.0.1) ruby2_keywords (~> 0.0.1)
@ -67,8 +66,8 @@ GEM
racc (~> 1.4) racc (~> 1.4)
options (2.3.2) options (2.3.2)
progress (3.6.0) progress (3.6.0)
progress_bar (1.3.3) progress_bar (1.3.4)
highline (>= 1.6, < 3) highline (>= 1.6)
options (~> 2.3.0) options (~> 2.3.0)
pry (0.14.2) pry (0.14.2)
coderay (~> 1.1) coderay (~> 1.1)
@ -126,7 +125,7 @@ GEM
strings-ansi (0.2.0) strings-ansi (0.2.0)
terminal-table (3.0.2) terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3) unicode-display_width (>= 1.1.1, < 3)
terser (1.2.2) terser (1.2.3)
execjs (>= 0.3.0, < 3) execjs (>= 0.3.0, < 3)
thin (1.8.2) thin (1.8.2)
daemons (~> 1.0, >= 1.0.9) daemons (~> 1.0, >= 1.0.9)
@ -188,7 +187,7 @@ DEPENDENCIES
yajl-ruby yajl-ruby
RUBY VERSION RUBY VERSION
ruby 3.3.1p55 ruby 3.3.2p78
BUNDLED WITH BUNDLED WITH
2.4.6 2.4.6

@ -172,6 +172,7 @@ Made something cool? Feel free to open a PR to add a new row to this table! You
| [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) | | [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) |
| [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) | | [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) |
| [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) | | [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) |
| [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) | | [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) | | [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) | | [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) |

@ -1,4 +1,8 @@
[ [
[
"2024-02-20",
"New documentation: <a href=\"/nextjs/\">Next.js</a>"
],
[ [
"2024-01-24", "2024-01-24",
"New documentation: <a href=\"/playwright/\">Playwright</a>" "New documentation: <a href=\"/playwright/\">Playwright</a>"

@ -2,7 +2,7 @@ module Docs
class Elisp class Elisp
class EntriesFilter < Docs::EntriesFilter class EntriesFilter < Docs::EntriesFilter
def get_name def get_name
# remove numbers at the beginnig # remove numbers at the beginning
name = at_css('.chapter', '.section', '.subsection', '.subsubsection', '.appendix').content.slice(/[[:alpha:]]...*/) name = at_css('.chapter', '.section', '.subsection', '.subsubsection', '.appendix').content.slice(/[[:alpha:]]...*/)
# remove 'Appendix' word # remove 'Appendix' word

@ -4,7 +4,7 @@ module Docs
# The GTK documentation paths are "flat" and while the contents of each # The GTK documentation paths are "flat" and while the contents of each
# page provides a way to determine the direct parent relationship, we # page provides a way to determine the direct parent relationship, we
# really need a full hierarchy of pages *a priori* to be able to fully # really need a full hierarchy of pages *a priori* to be able to fully
# categorize all pages and entries. So we're going to recursivly generate # categorize all pages and entries. So we're going to recursively generate
# a full map of page -> parent relationships from the table of contents... # a full map of page -> parent relationships from the table of contents...
PARENT_BY_PATH = {} PARENT_BY_PATH = {}

@ -15,7 +15,7 @@ module Docs
group = 'kubectl' group = 'kubectl'
commands = css('h1').to_a() commands = css('h1').to_a()
commands.map do |node| commands.map do |node|
# handle titles differnetly by converting them into sidebar groups (types) # handle titles differently by converting them into sidebar groups (types)
new_group = at_css("##{node['id']} > strong") new_group = at_css("##{node['id']} > strong")
if new_group if new_group
group = new_group.content.titleize group = new_group.content.titleize

@ -0,0 +1,30 @@
module Docs
class Nextjs
class CleanHtmlFilter < Filter
def call
@doc = at_css('.prose')
css('.zola-anchor').remove
doc.prepend_child("<h1>NextJS2</h1>") if root_page?
css('div:contains("NEWS:")').remove
css('h2:contains("sponsors"), #sponsor-table').remove
css('div.sticky').remove #remove the floating menu
css('div.-mt-4').remove #remove the navigation line
css('footer').remove
css('div.feedback_inlineTriggerWrapper__o7yUx').remove
css('header').remove #remove links from the top of the page
css('nav').remove
css('h1, h2, h3, h4').each { |node| node.content = node.content }
css('pre > code').each do |node|
node.parent['data-language'] = 'typescript'
node.parent.content = node.parent.content
end
css('div[class^="code-block_header"]').remove
doc
end
end
end
end

@ -0,0 +1,43 @@
module Docs
class Nextjs
class EntriesFilter < Docs::EntriesFilter
def get_name
name = at_css('h1').content
name.strip!
#name
subpath_items = subpath.split('/', -1)
if subpath_items.length >= 5
subpath_items[3].capitalize + ': ' + name # e.g. Routing: Defining Routes
else
name
end
end
def get_type
if slug.start_with?('architecture')
'Architecture'
elsif slug.start_with?('community')
'Community'
elsif slug.start_with?('getting-started')
'Getting Started'
elsif slug.start_with?('messages')
'Messages'
elsif slug.start_with?('app/building-your-application')
'Using App Router: Building your application'
elsif slug.start_with?('app/api-reference')
'Using App Router: api-reference'
elsif slug.start_with?('app')
'Using App Router'
elsif slug.start_with?('pages/building-your-application')
'Using Pages Router: Building your application'
elsif slug.start_with?('pages/api-reference')
'Using Pages Router: api-reference'
elsif slug.start_with?('pages')
'Using Pages Router'
else
get_name
end
end
end
end
end

@ -36,7 +36,7 @@ module Docs
def get_latest_version(opts) def get_latest_version(opts)
doc = fetch_doc('https://crystal-lang.org/', opts) doc = fetch_doc('https://crystal-lang.org/', opts)
doc.at_css('.latest-release').content.scan(/([0-9.]+)/)[0][0] doc.at_css('.latest-release-info > a > strong').content.scan(/([0-9.]+)/)[0][0]
end end
end end
end end

@ -96,7 +96,7 @@ module Docs
def get_latest_version(opts) def get_latest_version(opts)
doc = fetch_doc('https://docs.docker.com/engine/release-notes/', opts) doc = fetch_doc('https://docs.docker.com/engine/release-notes/', opts)
latest_version = doc.at_css('.content > section > h2').content.strip latest_version = doc.at_css('.DocSearch-content > h2 > a').content.strip
latest_version.rpartition(' ')[-1] latest_version.rpartition(' ')[-1]
end end
end end

@ -0,0 +1,26 @@
module Docs
class Nextjs < UrlScraper
self.name = 'Next.js'
self.slug = 'nextjs'
self.type = 'simple'
self.release = '14.2.4'
self.base_url = 'https://nextjs.org/docs'
self.initial_paths = %w(reference/)
self.links = {
home: 'https://www.nextjs.org/',
code: 'https://github.com/vercel/next.js'
}
html_filters.push 'nextjs/entries', 'nextjs/clean_html'
options[:download_images] = false
options[:attribution] = <<-HTML
&copy; 2024 Vercel, Inc.<br>
Licensed under the MIT License.
HTML
def get_latest_version(opts)
get_npm_version('next', opts)
end
end
end

@ -74,8 +74,8 @@ module Docs
end end
def get_latest_version(opts) def get_latest_version(opts)
doc = fetch_doc('https://nodejs.org/en/', opts) tags = get_github_tags('nodejs', 'node', opts)
doc.at_css('#home-intro > .home-downloadblock:last-of-type > a')['data-version'][1..-1] tags[0]['name'][1..-1]
end end
end end
end end

@ -51,7 +51,7 @@ module Docs
def get_latest_version(opts) def get_latest_version(opts)
doc = fetch_doc('https://octave.org/doc/interpreter/', opts) doc = fetch_doc('https://octave.org/doc/interpreter/', opts)
doc.at_css('h1').content.scan(/([0-9.]+)/)[0][0] doc.at_css('#SEC_Top + p').content.scan(/([0-9.]+)/)[1][0][0..-2]
end end
end end

@ -31,8 +31,8 @@ module Docs
end end
def get_latest_version(opts) def get_latest_version(opts)
doc = fetch_doc('https://docs.phalconphp.com/', opts) tags = get_github_tags('phalcon', 'cphalcon', opts)
doc.at_css('.header__lang.expand > div > ul > li > a').content tags[0]['name'][1..-1]
end end
end end
end end

@ -23,7 +23,7 @@ module Docs
HTML HTML
def get_latest_version(opts) def get_latest_version(opts)
get-npm-version("sanctuary-type-classes", opts) get_npm_version("sanctuary-type-classes", opts)
end end
end end
end end

@ -22,7 +22,7 @@ module Docs
html_filters.push 'vite/entries', 'vite/clean_html' html_filters.push 'vite/entries', 'vite/clean_html'
version do version do
self.release = '5.0.11' self.release = '5.2.13'
self.base_url = 'https://vitejs.dev/' self.base_url = 'https://vitejs.dev/'
end end

@ -19,7 +19,7 @@ module Docs
HTML HTML
version '3' do version '3' do
self.release = '3.4.5' self.release = '3.4.27'
self.base_url = 'https://vuejs.org/' self.base_url = 'https://vuejs.org/'
self.initial_paths = %w(guide/introduction.html) self.initial_paths = %w(guide/introduction.html)
html_filters.push 'vue/entries_v3', 'vue/clean_html' html_filters.push 'vue/entries_v3', 'vue/clean_html'

6
package-lock.json generated

@ -0,0 +1,6 @@
{
"name": "devdocs",
"lockfileVersion": 3,
"requires": true,
"packages": {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -0,0 +1,2 @@
https://assets.vercel.com/image/upload/v1662130559/nextjs/Icon_dark_background.png
https://github.com/vercel/next.js/blob/canary/examples/cms-enterspeed/public/favicon/favicon.ico
Loading…
Cancel
Save