History

Update Astro documentation (1.6.3)

Simon Legner committed 4 years ago

Commit aedb9c31 parent 7e0dacb3 files · +10 −1Browse files

Unified · Split

3 files
  1. lib/docs/filters/astro/clean_html.rb +5 −0
  2. lib/docs/filters/astro/entries.rb +2 −0
  3. lib/docs/scrapers/astro.rb +3 −1
lib/docs/filters/astro/clean_html.rb+5−0
@@ -5,6 +5,11 @@ module Docs · 4 unmodified lines
5 @doc = at_css('article > section')5 @doc = at_css('article > section')
6 6
7 css('.anchor-link').remove7 css('.anchor-link').remove
8 css('.avatar-list').remove
9
10 css('header > h1').each do |node|
11 node.parent.before(node).remove
12 end
8 13
9 css('pre').each do |node|14 css('pre').each do |node|
10 node.content = node.css('.line').map(&:content).join("\n")15 node.content = node.css('.line').map(&:content).join("\n")
lib/docs/filters/astro/entries.rb+2−0
@@ -14,6 +14,8 @@ module Docs · 13 unmodified lines
14 end14 end
15 15
16 def additional_entries16 def additional_entries
17 return if slug.start_with?('guides/deploy')
18 return if slug.start_with?('guides/integrations-guide')
17 at_css('article').css('h2, h3').each_with_object [] do |node, entries|19 at_css('article').css('h2, h3').each_with_object [] do |node, entries|
18 type = node.content.strip20 type = node.content.strip
19 type.sub! %r{\s*#\s*}, ''21 type.sub! %r{\s*#\s*}, ''
lib/docs/scrapers/astro.rb+3−1
@@ -14,7 +14,9 @@ module Docs · 13 unmodified lines
14 Licensed under the MIT License.14 Licensed under the MIT License.
15 HTML15 HTML
16 16
17 self.release = '1.4.7'17 options[:skip_patterns] = [/tutorial/]
18
19 self.release = '1.6.3'
18 self.base_url = 'https://docs.astro.build/en/'20 self.base_url = 'https://docs.astro.build/en/'
19 self.initial_paths = %w(getting-started/)21 self.initial_paths = %w(getting-started/)
20 22

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