Skip to content

Commit

Permalink
Use __dir__ instead of File.dirname(__FILE__)
Browse files Browse the repository at this point in the history
  • Loading branch information
generalmimon committed Oct 14, 2023
1 parent 54ca04d commit 46b2e90
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions _build/build-html
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,7 @@ class FormatPagesGenerator
end

def erb(name)
bin_dir = File.expand_path(File.dirname(__FILE__))
ERB.new(File.read("#{bin_dir}/#{name}.html.erb"), eoutvar: "_erbout_#{name}")
ERB.new(File.read(File.join(__dir__, "#{name}.html.erb")), eoutvar: "_erbout_#{name}")
end
end

Expand Down

0 comments on commit 46b2e90

Please sign in to comment.