-
-
Notifications
You must be signed in to change notification settings - Fork 335
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
feat: add script to auto update icons #760
Conversation
✅ Deploy Preview for hugo-congo ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
I think this is an interesting idea... although I wonder if the HTTP requests could be better avoided if this was included as an NPM package and copied across that way? It could then also be adapted to work with dependabot similarly to how the theme is rebuilt on other dependency updates. I believe the brands icons are available through NPM at |
I'm all for an automagic tool to make dev life better.... That being said, I do wonder about the challenges that might arise from baking a python script into the CI pipeline for a codebase that's predominantly golang and node. I could see this being problematic, for example, if CI containers don't have a fully functional system... rather just the pieces to do the needful; and in this case, there's no existing python, so it'd be introducing the possibility of CI management pain for futureUs™️. the brands icons' availability as an NPM package helps in one fashion for sure, but that doesn't really address the underlying need to manipulate the SVGs to get the fill/stroke properties set properly so's tailwind's voodoo works properly.... I wonder if it's worth trying to get fontAwesome to release the icons preprocessed such that this is a solved problem.... It seems to me that we're not the only ones... BY FAR... to have this need... |
This seems like a good idea, maybe I'll give it a go. |
Let me try to do more searching online |
I can't seem to get the direct import from fontawesome working, but this script should work fine. To run it just do
Please let me know if there is anything I missed out/any other suggestions I will add the jsdocs for the functions when i am free later |
I really like this script but I still feel like a lot of the logic could be done locally if the SVG was just a direct file copy from |
yeah, |
Turns out I was using the wrong npm package. |
Thanks for the update, I think this is now complete in terms of functionality. Are you happy with the current state of the PR? |
Yeap, currently happy with the state of the MR. |
No, I'm happy with how this is working now. The only potential addition is calling Prettier to reformat the Markdown files once the icon is added to the table but it's something that could be added later. Thanks for all your work on this one. I'll merge this in! |
I think this feature will be good for adding future icons to the page.
Possible future use:
Please let me know if there is anything else required for this MR.