File tree Expand file tree Collapse file tree 2 files changed +27
-10
lines changed
Expand file tree Collapse file tree 2 files changed +27
-10
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,10 @@ class Nextjs
33 class CleanHtmlFilter < Filter
44 def call
55 css ( '.zola-anchor' ) . remove
6- doc . prepend_child ( "<h1>NextJS </h1>" ) if root_page?
6+ doc . prepend_child ( "<h1>NextJS2 </h1>" ) if root_page?
77 css ( 'div:contains("NEWS:")' ) . remove
88 css ( 'h2:contains("sponsors"), #sponsor-table' ) . remove
9+ css ( 'div.sticky' ) . remove #remove the floating menu
910 doc
1011 end
1112 end
Original file line number Diff line number Diff line change 11module Docs
2- class Nextjs
3- class EntriesFilter < Docs ::EntriesFilter
4- def get_name
5- at_css ( 'h1' ) . content
6- end
2+ class Nextjs
3+ class EntriesFilter < Docs ::EntriesFilter
4+ def get_name
5+ name = at_css ( 'h1' ) . content
6+ name . strip!
7+ name
8+ end
79
8- def get_type
9- get_name
10- end
10+ def get_type
11+ if subpath . include? ( '/architecture' )
12+ 'Architecture'
13+ elsif subpath . include? ( '/community' )
14+ 'Community'
15+ elsif subpath . include? ( '/getting-started' )
16+ 'Getting Started'
17+ elsif subpath . include? ( '/messages' )
18+ 'Messages'
19+ elsif subpath . include? ( '/app' )
20+ 'Using App Router'
21+ elsif subpath . include? ( '/pages' )
22+ 'Using Pages Router'
23+ else
24+ get_name
1125 end
26+ end
1227 end
13- end
28+ end
29+ end
You can’t perform that action at this time.
0 commit comments