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
3
3
class CleanHtmlFilter < Filter
4
4
def call
5
5
css ( '.zola-anchor' ) . remove
6
- doc . prepend_child ( "<h1>NextJS </h1>" ) if root_page?
6
+ doc . prepend_child ( "<h1>NextJS2 </h1>" ) if root_page?
7
7
css ( 'div:contains("NEWS:")' ) . remove
8
8
css ( 'h2:contains("sponsors"), #sponsor-table' ) . remove
9
+ css ( 'div.sticky' ) . remove #remove the floating menu
9
10
doc
10
11
end
11
12
end
Original file line number Diff line number Diff line change 1
1
module 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
7
9
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
11
25
end
26
+ end
12
27
end
13
- end
28
+ end
29
+ end
You can’t perform that action at this time.
0 commit comments