Merge pull request #888 from birjolaxew/fix/882
Limit destructive filename mapping
Before Width: | Height: | Size: 808 B After Width: | Height: | Size: 808 B |
Before Width: | Height: | Size: 858 B After Width: | Height: | Size: 858 B |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 859 B After Width: | Height: | Size: 859 B |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 771 B After Width: | Height: | Size: 771 B |
Before Width: | Height: | Size: 906 B After Width: | Height: | Size: 906 B |
Before Width: | Height: | Size: 960 B After Width: | Height: | Size: 960 B |
Before Width: | Height: | Size: 516 B After Width: | Height: | Size: 516 B |
Before Width: | Height: | Size: 406 B After Width: | Height: | Size: 406 B |
Before Width: | Height: | Size: 667 B After Width: | Height: | Size: 667 B |
Before Width: | Height: | Size: 431 B After Width: | Height: | Size: 431 B |
Before Width: | Height: | Size: 777 B After Width: | Height: | Size: 777 B |
Before Width: | Height: | Size: 269 B After Width: | Height: | Size: 269 B |
11
index.html
@ -5,7 +5,16 @@
|
||||
{% assign greyscaleIconsUnsortedString = "" %}
|
||||
{% for icon in site.data.simple-icons.icons %}
|
||||
{% assign title = icon.title %}
|
||||
{% assign filename = icon.title | replace: "+", "plus" | replace: " ", "" | replace: ".", "" | replace: "-", "" | replace: "!", "" | replace: "’", "" | downcase %}
|
||||
{% assign filename = icon.title %}
|
||||
{% assign _splitFilename = filename | split: "" %}
|
||||
{% if _splitFilename.first == "." %}
|
||||
{% assign filename = filename | replace_first: ".", "dot-" %}
|
||||
{% endif %}
|
||||
{% if _splitFilename.last == "." %}
|
||||
{% assign _filenameLenMin1 = filename | size | minus: 1 %}
|
||||
{% assign filename = filename | slice: 0, _filenameLenMin1 | append: "-dot" %}
|
||||
{% endif %}
|
||||
{% assign filename = filename | replace: "+", "plus" | replace: " ", "" | replace: ".", "-dot-" | replace: "!", "" | replace: "’", "" | downcase %}
|
||||
{% assign hex = icon.hex %}
|
||||
{% assign hex = icon.hex %}
|
||||
{% assign hexCharacter1 = hex | slice: 0, 1 %}
|
||||
|