mirror of https://github.com/freeCodeCamp/devdocs
parent
33fc830ea5
commit
10a6334650
@ -0,0 +1,14 @@
|
|||||||
|
module Docs
|
||||||
|
class Nextjs
|
||||||
|
class CleanHtmlFilter < Filter
|
||||||
|
def call
|
||||||
|
css('.zola-anchor').remove
|
||||||
|
doc.prepend_child("<h1>htmx</h1>") if root_page?
|
||||||
|
css('div:contains("NEWS:")').remove
|
||||||
|
css('h2:contains("sponsors"), #sponsor-table').remove
|
||||||
|
end
|
||||||
|
doc
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,13 @@
|
|||||||
|
module Docs
|
||||||
|
class Nextjs
|
||||||
|
class EntriesFilter < Docs::EntriesFilter
|
||||||
|
def get_name
|
||||||
|
at_css('h1').content
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_type
|
||||||
|
get_name
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,10 @@
|
|||||||
|
module Docs
|
||||||
|
class Nextjs < UrlScraper
|
||||||
|
self.name = 'nextjs`'
|
||||||
|
self.type = 'simple'
|
||||||
|
self.release = 'v14.1.0'
|
||||||
|
self.base_url = 'https://nextjs.org/docs'
|
||||||
|
self.initial_paths = %w(reference/)
|
||||||
|
html_filters.push 'nextjs/entries', 'nextjs/clean_html'
|
||||||
|
end
|
||||||
|
end
|
After Width: | Height: | Size: 537 B |
After Width: | Height: | Size: 1.3 KiB |
@ -0,0 +1,2 @@
|
|||||||
|
https://assets.vercel.com/image/upload/v1662130559/nextjs/Icon_dark_background.png
|
||||||
|
https://github.com/vercel/next.js/blob/canary/examples/cms-enterspeed/public/favicon/favicon.ico
|
Loading…
Reference in new issue