Skip to content

Commit

Permalink
Why complicate things?
Browse files Browse the repository at this point in the history
  • Loading branch information
elcuervo committed Feb 1, 2024
1 parent 4a01846 commit 0ae3998
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions _plugins/filters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@

module CustomFilters
def buster(filename)
filepath = File.join(@context.registers[:site].dest, filename)

Digest::SHA256
.file(filepath)
.then { |sha| sha.hexdigest }
.then { |digest| "#{filename}?#{digest}" }
"#{filename}?d=#{Time.now.to_i}"
end

def css_asset(filename)
Expand Down

0 comments on commit 0ae3998

Please sign in to comment.