History

Add Deno documentation (1.17.2)

Simon Legner committed 4 years ago

Commit f19a61a1 parent 7e571ee8 files · +68 −-2Browse files

Unified · Split

8 files
  1. assets/javascripts/news.json +4 −0
  2. assets/javascripts/templates/pages/about_tmpl.coffee +5 −0
  3. lib/docs/filters/deno/clean_html.rb +22 −0
  4. lib/docs/filters/deno/entries.rb +15 −0
  5. lib/docs/scrapers/deno.rb +23 −0
  6. public/icons/docs/deno/16.png +0 −0
  7. public/icons/docs/deno/16@2x.png +0 −0
  8. public/icons/docs/deno/SOURCE +1 −0
assets/javascripts/news.json+4−0
@@ -1,4 +1,8 @@
1[1[
2 [
3 "2022-01-09",
4 "New documentation: <a href=\"/deno/\">Deno</a>"
5 ],
2 [6 [
3 "2021-12-29",7 "2021-12-29",
4 "New documentation: <a href=\"/point_cloud_library/\">PointCloudLibrary</a>"8 "New documentation: <a href=\"/point_cloud_library/\">PointCloudLibrary</a>"
assets/javascripts/templates/pages/about_tmpl.coffee+5−0
@@ -232,6 +232,11 @@ credits = [ · 231 unmodified lines
232 '2012 the Dart project authors',232 '2012 the Dart project authors',
233 'CC BY-SA',233 'CC BY-SA',
234 'https://creativecommons.org/licenses/by-sa/4.0/'234 'https://creativecommons.org/licenses/by-sa/4.0/'
235 ], [
236 'Deno',
237 '2018–2021 the Deno authors',
238 'MIT',
239 'https://raw.githubusercontent.com/denoland/manual/main/LICENSE'
235 ], [240 ], [
236 'Django',241 'Django',
237 'Django Software Foundation and individual contributors',242 'Django Software Foundation and individual contributors',
lib/docs/filters/deno/clean_html.rb+22−0
@@ -0,0 +1,22 @@
1module Docs
2 class Deno
3 class CleanHtmlFilter < Filter
4 def call
5 if root_page?
6 @doc = at_css('h2[id]').parent.parent
7 else
8 @doc = at_css('article')
9 end
10
11 css('*[aria-label="Anchor"]').remove
12 css('*[class]').remove_attribute('class')
13 css('pre').each do |node|
14 node['data-language'] = 'typescript'
15 end
16 xpath('//a[text()="[src]"]').remove
17
18 doc
19 end
20 end
21 end
22end
lib/docs/filters/deno/entries.rb+15−0
@@ -0,0 +1,15 @@
1module Docs
2 class Deno
3 class EntriesFilter < Docs::EntriesFilter
4
5 def get_name
6 at_css('h1').content
7 end
8
9 def get_type
10 'Deno CLI APIs'
11 end
12
13 end
14 end
15end
lib/docs/scrapers/deno.rb+23−0
@@ -0,0 +1,23 @@
1module Docs
2 class Deno < UrlScraper
3 self.name = 'Deno'
4 self.type = 'simple'
5 self.release = '1.17.2'
6 self.base_url = 'https://doc.deno.land/deno/stable/'
7 self.links = {
8 home: 'https://deno.land/',
9 code: 'https://github.com/denoland/deno'
10 }
11
12 html_filters.push 'deno/entries', 'deno/clean_html'
13
14 # https://github.com/denoland/manual/blob/main/LICENSE
15 options[:attribution] = <<-HTML
16 &copy; 2018–2021 the Deno authors
17 HTML
18
19 def get_latest_version(opts)
20 get_latest_github_release('denoland', 'deno', opts)
21 end
22 end
23end
public/icons/docs/deno/16.png+0−0

Binary file not shown.

public/icons/docs/deno/16@2x.png+0−0

Binary file not shown.

public/icons/docs/deno/SOURCE+1−0
@@ -0,0 +1 @@
1https://doc.deno.land/static/apple-touch-icon.png

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t