<commit_before># This provides a "fingerprint" of my CSS files.
#
# Roughly speaking, it's a hash of all the Sass files that get smushed
# together into a single CSS file.  This gets included in the link to
# the CSS files, so clients can cache the CSS file until it changes.

checksums = Dir.glob("src/_scss/*.scss").map { |f|
  Digest::MD5.file(open f).hexdigest
}
<commit_msg>Sort the source files for the CSS fingerprint<commit_after># This provides a "fingerprint" of my CSS files.
#
# Roughly speaking, it's a hash of all the Sass files that get smushed
# together into a single CSS file.  This gets included in the link to
# the CSS files, so clients can cache the CSS file until it changes.

# Note: it's important the source files are in a consistent order.
# Globbing doesn't seem to return a fixed order, so we sort ourselves.
# See https://github.com/alexwlchan/alexwlchan.net/issues/493
source_files = Dir.glob("src/_scss/*.scss").sort

checksums = source_files.map { |f|
  Digest::MD5.file(open f).hexdigest
}

{'fraction_non_alphanumeric': 0.091796875, 'fraction_numerical': 0.0048828125, 'mean_word_length': 4.150753768844221, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3722589', 'n_tokens_mistral': 329, 'n_tokens_neox': 311, 'n_words': 140}