-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow custom slugs #4918
Merged
PeterShaggyNoble
merged 13 commits into
simple-icons:develop
from
ericcornelissen:custom-slugs
Feb 19, 2021
Merged
Allow custom slugs #4918
Changes from 12 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
8e0bc8a
Update JSON scheme, build & test scripts for custom slugs
ericcornelissen 6791e47
Example: invalid custom slug
ericcornelissen 63dd392
Example: valid slug, wrong filename
ericcornelissen a37f73c
Example: custom slug, correct filename
ericcornelissen 3aa70d9
Revert to 8e0bc8a85caa86e3732fa4a56909e6b02785fa01
ericcornelissen b2a2d22
Update index.html for custom slugs
ericcornelissen dd629af
Example: custom slug for 1Password
ericcornelissen 664717f
Revert to b2a2d22393d4017cf93d3d76e01ea6f3c8d4acd0
ericcornelissen d99028f
Make NPM package API backwards compatible with custom slugs
ericcornelissen 14a1aa9
Example: two icons with same tile
ericcornelissen e16681b
Revert to d99028f7a97afe5c3fbc59603a3c4674d163e992
ericcornelissen 0550047
Update NodeJS usage documentation
ericcornelissen c77d5f3
Merge branch 'develop' into custom-slugs
ericcornelissen File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this not be an
if/else
statement (assuming Liquid supports them), to avoid all those replacements ifslug
is present?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Liquid does support
if/else
statements and we can write it using one, this is just the lazy version (from the programmer's perspective): Liquid will first do all the replacements on the filename - for all icons - and if the icon has a slug specified then the filename is replaced by the slug. It's just wasting a bunch of CPU cycles for icons that have a custom slug.I'd be happy to change it if you prefer 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, given that we'll have switched over to the new site before we have enough
slug
entries for this to be a major issue, I don't think it's such a big deal if we don't update it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was my reasoning for this going with this easier but more obscure solution as well 😄