mirror of https://github.com/freeCodeCamp/devdocs
parent
deb5f81654
commit
a1d4f87fc4
@ -1,13 +1,29 @@
|
|||||||
module Docs
|
module Docs
|
||||||
class Nextjs
|
class Nextjs
|
||||||
class EntriesFilter < Docs::EntriesFilter
|
class EntriesFilter < Docs::EntriesFilter
|
||||||
def get_name
|
def get_name
|
||||||
at_css('h1').content
|
name = at_css('h1').content
|
||||||
end
|
name.strip!
|
||||||
|
name
|
||||||
|
end
|
||||||
|
|
||||||
def get_type
|
def get_type
|
||||||
get_name
|
if subpath.include?('/architecture')
|
||||||
end
|
'Architecture'
|
||||||
|
elsif subpath.include?('/community')
|
||||||
|
'Community'
|
||||||
|
elsif subpath.include?('/getting-started')
|
||||||
|
'Getting Started'
|
||||||
|
elsif subpath.include?('/messages')
|
||||||
|
'Messages'
|
||||||
|
elsif subpath.include?('/app')
|
||||||
|
'Using App Router'
|
||||||
|
elsif subpath.include?('/pages')
|
||||||
|
'Using Pages Router'
|
||||||
|
else
|
||||||
|
get_name
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
Loading…
Reference in new issue