diff options
author | lonkaars <loek@pipeframe.xyz> | 2024-04-12 13:24:23 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2024-04-12 13:24:23 +0200 |
commit | ce37824c5260dd370c61cf174ea80ca7deeb1058 (patch) | |
tree | c72f247e72c8279c93a662cdd46a440e825bdfbb /_plugins | |
parent | c364c4b0273e76cb13571878d1a4a2853a392b9b (diff) |
more WIP transition
Diffstat (limited to '_plugins')
-rw-r--r-- | _plugins/tag-color.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/_plugins/tag-color.rb b/_plugins/tag-color.rb new file mode 100644 index 0000000..3927abf --- /dev/null +++ b/_plugins/tag-color.rb @@ -0,0 +1,13 @@ +module TagColor + def to_tag_color(str) + sum = 0 + str.chars.each do |i| + sum += ?i.ord + sum %= 360 + end + sum + end +end + +Liquid::Template.register_filter(TagColor) + |