Merge pull request #1688 from freeCodeCamp/deno

Add Deno documentation (1.17.2)
pull/1690/head
Simon Legner 3 years ago committed by GitHub
commit 6838a87618
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,4 +1,8 @@
[
[
"2022-01-09",
"New documentation: <a href=\"/deno/\">Deno</a>"
],
[
"2021-12-29",
"New documentation: <a href=\"/point_cloud_library/\">PointCloudLibrary</a>"

@ -232,6 +232,11 @@ credits = [
'2012 the Dart project authors',
'CC BY-SA',
'https://creativecommons.org/licenses/by-sa/4.0/'
], [
'Deno',
'20182021 the Deno authors',
'MIT',
'https://raw.githubusercontent.com/denoland/manual/main/LICENSE'
], [
'Django',
'Django Software Foundation and individual contributors',

@ -0,0 +1,22 @@
module Docs
class Deno
class CleanHtmlFilter < Filter
def call
if root_page?
@doc = at_css('h2[id]').parent.parent
else
@doc = at_css('article')
end
css('*[aria-label="Anchor"]').remove
css('*[class]').remove_attribute('class')
css('pre').each do |node|
node['data-language'] = 'typescript'
end
xpath('//a[text()="[src]"]').remove
doc
end
end
end
end

@ -0,0 +1,15 @@
module Docs
class Deno
class EntriesFilter < Docs::EntriesFilter
def get_name
at_css('h1').content
end
def get_type
'Deno CLI APIs'
end
end
end
end

@ -0,0 +1,23 @@
module Docs
class Deno < UrlScraper
self.name = 'Deno'
self.type = 'simple'
self.release = '1.17.2'
self.base_url = 'https://doc.deno.land/deno/stable/'
self.links = {
home: 'https://deno.land/',
code: 'https://github.com/denoland/deno'
}
html_filters.push 'deno/entries', 'deno/clean_html'
# https://github.com/denoland/manual/blob/main/LICENSE
options[:attribution] = <<-HTML
&copy; 20182021 the Deno authors
HTML
def get_latest_version(opts)
get_latest_github_release('denoland', 'deno', opts)
end
end
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 987 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -0,0 +1 @@
https://doc.deno.land/static/apple-touch-icon.png
Loading…
Cancel
Save