History

Update Deno documentation (2.4.4)

Simon Legner committed 1 year ago

Commit 24591d41 parent 5d7ef833 files · +6 −4Browse files

Unified · Split

3 files
  1. lib/docs/filters/deno/clean_html.rb +2 −1
  2. lib/docs/filters/deno/entries.rb +1 −1
  3. lib/docs/scrapers/deno.rb +3 −2
lib/docs/filters/deno/clean_html.rb+2−1
@@ -3,7 +3,7 @@ module Docs · 2 unmodified lines
3 class CleanHtmlFilter < Filter3 class CleanHtmlFilter < Filter
4 def call4 def call
5 if result[:path].start_with?('api/deno/')5 if result[:path].start_with?('api/deno/')
6 @doc = at_css('main')6 @doc = at_css('main[id!="content"] article', 'main[id!="content"]')
7 else7 else
8 @doc = at_css('main article .markdown-body')8 @doc = at_css('main article .markdown-body')
9 end9 end
@@ -25,6 +25,7 @@ module Docs · 15 unmodified lines
25 end25 end
26 26
27 css('a.header-anchor').remove()27 css('a.header-anchor').remove()
28 css('.breadcrumbs').remove()
28 29
29 doc30 doc
30 end31 end
lib/docs/filters/deno/entries.rb+1−1
@@ -4,7 +4,7 @@ module Docs · 3 unmodified lines
4 4
5 def get_name5 def get_name
6 if result[:path].start_with?('api/deno/')6 if result[:path].start_with?('api/deno/')
7 at_css('main')['id'][/\Asymbol_([.\w]+)/, 1]7 at_css('main[id!="content"]')['id'][/\Asymbol_([.\w]+)/, 1]
8 else8 else
9 at_css('main article h1').content9 at_css('main article h1').content
10 end10 end
lib/docs/scrapers/deno.rb+3−2
@@ -8,8 +8,9 @@ module Docs · 7 unmodified lines
8 }8 }
9 9
10 # https://github.com/denoland/manual/blob/main/LICENSE10 # https://github.com/denoland/manual/blob/main/LICENSE
11 # https://github.com/denoland/deno/blob/main/LICENSE.md
11 options[:attribution] = <<-HTML12 options[:attribution] = <<-HTML
12 &copy; 2018–2024 the Deno authors<br>13 &copy; 2018–2025 the Deno authors<br>
13 Licensed under the MIT License.14 Licensed under the MIT License.
14 HTML15 HTML
15 16
@@ -17,7 +18,7 @@ module Docs · 1 unmodified line
17 html_filters.push 'deno/entries', 'deno/clean_html'18 html_filters.push 'deno/entries', 'deno/clean_html'
18 19
19 version '2' do20 version '2' do
20 self.release = '2.1.1'21 self.release = '2.4.4'
21 self.base_url = 'https://docs.deno.com/'22 self.base_url = 'https://docs.deno.com/'
22 self.root_path = 'runtime'23 self.root_path = 'runtime'
23 options[:only_patterns] = [/\Aruntime/, /\Aapi\/deno\/~/, /\Adeploy/, /\Asubhosting/]24 options[:only_patterns] = [/\Aruntime/, /\Aapi\/deno\/~/, /\Adeploy/, /\Asubhosting/]