diff --git a/lib/docs/filters/astro/clean_html.rb b/lib/docs/filters/astro/clean_html.rb index 0bcccd22..92c29302 100644 --- a/lib/docs/filters/astro/clean_html.rb +++ b/lib/docs/filters/astro/clean_html.rb @@ -26,6 +26,10 @@ module Docs node.before(node.children).remove end + css('.cms-nav').remove + + css('.copy-button-wrapper, .copy-button-tooltip').remove + doc end end diff --git a/lib/docs/filters/astro/entries.rb b/lib/docs/filters/astro/entries.rb index eef550b4..fc03d514 100644 --- a/lib/docs/filters/astro/entries.rb +++ b/lib/docs/filters/astro/entries.rb @@ -2,7 +2,7 @@ module Docs class Astro class EntriesFilter < Docs::EntriesFilter def get_name - name = at_css('h1').content + name = at_css('article h1').content name.sub! %r{\s*#\s*}, '' name end @@ -16,7 +16,7 @@ module Docs def additional_entries return if slug.start_with?('guides/deploy') return if slug.start_with?('guides/integrations-guide') - at_css('article').css('h2, h3').each_with_object [] do |node, entries| + at_css('article').css('h2[id], h3[id]').each_with_object [] do |node, entries| type = node.content.strip type.sub! %r{\s*#\s*}, '' entries << ["#{name}: #{type}", node['id']] diff --git a/lib/docs/scrapers/astro.rb b/lib/docs/scrapers/astro.rb index 30655be4..ec2124c0 100644 --- a/lib/docs/scrapers/astro.rb +++ b/lib/docs/scrapers/astro.rb @@ -16,7 +16,7 @@ module Docs options[:skip_patterns] = [/tutorial/] - self.release = '2.0.0' + self.release = '2.6.3' self.base_url = 'https://docs.astro.build/en/' self.initial_paths = %w(getting-started/)