diff --git a/lib/docs/scrapers/http.rb b/lib/docs/scrapers/http.rb index b8f38218..a2f4a7f9 100644 --- a/lib/docs/scrapers/http.rb +++ b/lib/docs/scrapers/http.rb @@ -8,6 +8,15 @@ module Docs 'https://developer.mozilla.org/en-US/docs/Web/HTTP', 'https://datatracker.ietf.org/doc/html/', ] + self.links = { + home: 'https://developer.mozilla.org/en-US/docs/Web/HTTP', + code: 'https://github.com/mdn/content/tree/main/files/en-us/web/http' + } + + options[:attribution] = <<-HTML + © 2005–2023 MDN contributors.
+ Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later. + HTML html_filters.push 'http/clean_html', 'http/entries', 'title' diff --git a/lib/docs/scrapers/mdn/css.rb b/lib/docs/scrapers/mdn/css.rb index 724a6fec..38ac2de6 100644 --- a/lib/docs/scrapers/mdn/css.rb +++ b/lib/docs/scrapers/mdn/css.rb @@ -4,6 +4,10 @@ module Docs self.name = 'CSS' self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/CSS' self.root_path = '/Reference' + self.links = { + home: 'https://developer.mozilla.org/en-US/docs/Web/CSS', + code: 'https://github.com/mdn/content/tree/main/files/en-us/web/css' + } html_filters.push 'css/clean_html', 'css/entries' diff --git a/lib/docs/scrapers/mdn/dom.rb b/lib/docs/scrapers/mdn/dom.rb index 7af13d55..b9466c1e 100644 --- a/lib/docs/scrapers/mdn/dom.rb +++ b/lib/docs/scrapers/mdn/dom.rb @@ -5,6 +5,10 @@ module Docs self.name = 'Web APIs' self.slug = 'dom' self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/API' + self.links = { + home: 'https://developer.mozilla.org/en-US/docs/Web/API', + code: 'https://github.com/mdn/content/tree/main/files/en-us/web/api' + } html_filters.push 'dom/clean_html', 'dom/entries' diff --git a/lib/docs/scrapers/mdn/html.rb b/lib/docs/scrapers/mdn/html.rb index be7e7bae..4857b702 100644 --- a/lib/docs/scrapers/mdn/html.rb +++ b/lib/docs/scrapers/mdn/html.rb @@ -5,6 +5,10 @@ module Docs # release = '2023-01-06' self.name = 'HTML' self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/HTML' + self.links = { + home: 'https://developer.mozilla.org/en-US/docs/Web/HTML', + code: 'https://github.com/mdn/content/tree/main/files/en-us/web/html' + } html_filters.push 'html/clean_html', 'html/entries' diff --git a/lib/docs/scrapers/mdn/javascript.rb b/lib/docs/scrapers/mdn/javascript.rb index 8c1a64bc..b935ff9e 100644 --- a/lib/docs/scrapers/mdn/javascript.rb +++ b/lib/docs/scrapers/mdn/javascript.rb @@ -6,6 +6,10 @@ module Docs # release = '2023-01-06' self.name = 'JavaScript' self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference' + self.links = { + home: 'https://developer.mozilla.org/en-US/docs/Web/JavaScript', + code: 'https://github.com/mdn/content/tree/main/files/en-us/web/javascript' + } html_filters.push 'javascript/clean_html', 'javascript/entries' diff --git a/lib/docs/scrapers/mdn/mdn.rb b/lib/docs/scrapers/mdn/mdn.rb index 54856e47..00c43c3f 100644 --- a/lib/docs/scrapers/mdn/mdn.rb +++ b/lib/docs/scrapers/mdn/mdn.rb @@ -2,6 +2,10 @@ module Docs class Mdn < UrlScraper self.abstract = true self.type = 'mdn' + self.links = { + home: 'https://developer.mozilla.org', + code: 'https://github.com/mdn/content' + } html_filters.push 'mdn/clean_html', 'mdn/compat_tables' diff --git a/lib/docs/scrapers/mdn/svg.rb b/lib/docs/scrapers/mdn/svg.rb index 689fae99..3fc67113 100644 --- a/lib/docs/scrapers/mdn/svg.rb +++ b/lib/docs/scrapers/mdn/svg.rb @@ -6,6 +6,10 @@ module Docs # release = '2022-09-06' self.name = 'SVG' self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/SVG' + self.links = { + home: 'https://developer.mozilla.org/en-US/docs/Web/SVG', + code: 'https://github.com/mdn/content/tree/main/files/en-us/web/svg' + } html_filters.push 'svg/clean_html', 'svg/entries' diff --git a/lib/docs/scrapers/mdn/web_extensions.rb b/lib/docs/scrapers/mdn/web_extensions.rb index 664ca985..ccbbe47b 100644 --- a/lib/docs/scrapers/mdn/web_extensions.rb +++ b/lib/docs/scrapers/mdn/web_extensions.rb @@ -4,9 +4,9 @@ module Docs self.name = 'Web Extensions' self.slug = 'web_extensions' self.links = { - home: 'https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions' + home: 'https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions', + code: 'https://github.com/mdn/content/tree/main/files/en-us/mozilla/add-ons/webextensions' } - self.base_url = 'https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions' html_filters.push 'web_extensions/entries', 'web_extensions/clean_html'