Update VueUse documentation

pull/1858/merge
Simon Legner 2 years ago
parent 1a22ee32df
commit 5fc0e9a419

@ -3,11 +3,13 @@ module Docs
class CleanHtmlFilter < Filter
def call
css('#demo, #contributors ~ div, #contributors, #changelog ~ div, #changelog').remove
css('span.lang').remove
css('pre.vp-code-dark').remove
css('.grid').each do |table|
table.name = 'table'
tr = nil
table.children.each do |td|
table.css('> div').each do |td|
if td['opacity']
table.add_child('<tr>')
tr = table.last_element_child

@ -10,7 +10,9 @@ module Docs
def get_type
return 'Guide' if slug == 'export-size'
return 'Guide' if slug == 'functions'
link = at_css('aside .link.active')
return 'Guide' if slug == 'guidelines'
return 'Guide' if slug.start_with? 'guide'
link = at_css('.link.active')
link.ancestors('section').at_css('.title').content
end
end

@ -11,6 +11,8 @@ module Docs
options[:skip] = %w(add-ons contributing ecosystem)
options[:skip_patterns] = [/index$/]
options[:fix_urls] = ->(url) do
url.sub! %r{/index$}, ''
url.sub! 'vueuse.org/on', 'vueuse.org/core/on'
url.sub! 'vueuse.org/use', 'vueuse.org/core/use'
url
end

Loading…
Cancel
Save