Skip to content

Commit 56b8398

Browse files
committed
Remove the HASH_LENGTH constant
1 parent e88239a commit 56b8398

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/jekyll/transcode-image-filters.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@
33

44
module Jekyll
55
module TranscodeImageFilters
6-
HASH_LENGTH = 32
7-
86
# Computes the name of the file in the cache.
97
# @param absolute_path_source [String] Full path to the source file
108
# @param resolution [String] As an example: 900x900
119
# @param format [String] As an example: webp or jpg
1210
# @return [String]
1311
def _compute_cache_filename(absolute_path_source, resolution, format)
1412
hash = Digest::SHA256.file(absolute_path_source)
15-
short_hash = hash.hexdigest()[0, HASH_LENGTH]
13+
short_hash = hash.hexdigest()[0, 32]
1614

1715
if resolution && resolution != "original"
1816
"#{short_hash}-#{resolution}.#{format}"

0 commit comments

Comments
 (0)