File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -8,21 +8,17 @@ class CustomChecks < ::HTMLProofer::Check
88 BASE_PATH = '_site'
99
1010 def run
11- current_filename = @runner . current_filename
12- puts "\t checking ... " + current_filename [ 5 ..] . split ( '.' ) . first
13-
14- check_directory_structure
11+ filename = @runner . current_filename
12+ puts "\t checking ... " + filename . delete_prefix ( '_site' )
13+ check_directory_structure ( filename ) if filename . end_with? ( '.html' )
1514 end
1615
1716 # Check directory structure to ensure all pages are generated as index.html
1817 # This ensures proper routing for both /foobar/ and /foobar pathes.
19- def check_directory_structure
18+ def check_directory_structure ( filename )
2019 allowed_names = [ 'index.html' , '404.html' ]
2120 current_file = @runner . current_filename
2221
23- # Only check HTML files
24- return unless current_file . end_with? ( '.html' )
25-
2622 # Get the filename
2723 filename = File . basename ( current_file )
2824
You can’t perform that action at this time.
0 commit comments