Merge pull request #1 from snzow/code-working

Code working
pull/2180/head
Aodhan Bower 11 months ago committed by GitHub
commit ccba127ba6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -3,7 +3,7 @@ module Docs
class CleanHtmlFilter < Filter class CleanHtmlFilter < Filter
def call def call
css('.zola-anchor').remove css('.zola-anchor').remove
doc.prepend_child("<h1>htmx</h1>") if root_page? doc.prepend_child("<h1>NextJS</h1>") if root_page?
css('div:contains("NEWS:")').remove css('div:contains("NEWS:")').remove
css('h2:contains("sponsors"), #sponsor-table').remove css('h2:contains("sponsors"), #sponsor-table').remove
doc doc

@ -1,10 +1,20 @@
module Docs module Docs
class Nextjs < UrlScraper class Nextjs < UrlScraper
self.name = 'nextjs`' self.name = 'NextJS'
self.type = 'simple' self.type = 'simple'
self.release = 'v14.1.0' self.release = 'v14.1.0'
self.base_url = 'https://nextjs.org/docs' self.base_url = 'https://nextjs.org/docs'
self.initial_paths = %w(reference/) self.initial_paths = %w(reference/)
html_filters.push 'nextjs/entries', 'nextjs/clean_html' self.links = {
home: 'https://www.nextjs.org/',
code: 'https://github.com/vercel/next.js'
}
html_filters.push 'nextjs/entries', 'nextjs/clean_html'
options[:attribution] = <<-HTML
&copy; 2024 Vercel, Inc.
Licensed under the MIT License.
HTML
end end
end end

Loading…
Cancel
Save