-
Notifications
You must be signed in to change notification settings - Fork 309
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
DEV - Add Fontawesome scripts to build assets #1982
base: main
Are you sure you want to change the base?
Conversation
I can explain your We are dealing with a dependency failure between two scripts:
The Font Awesome library needs to be loaded first because the custom icon script calls it like so: FontAwesome.library.add(/* icon object */) The Font Awesome and custom icon scripts are loaded with different Jinja macros at different points in the layout template (which is the base template for all of the pages in the docs). Going from the top to the bottom of the template, here is a list of the relevant macros:
So this is the problem. The custom icon script depends on the Font Awesome script. Before PR 1955, the Font Awesome script was loaded before the custom icon script. Now it's loaded after. So when the custom icon script executes, it references an undefined global, There are a number of different ways we could try to solve this, but the most straightforward is to restore the Note that PR 1955 also added the |
Thanks @gabalafou to fix the immediate issues with FA I added the FontAwesome JS scripts to the |
Will also mark this as a release blocker as we need to get this merged to ensure that FA is properly vendored for end-users |
I seem to have forgotten to add the FA scripts to the
pyproject.toml
so I am adding it here (which should fix the FA rendering issue in the dev version of the docs).@gabalafou Additionally, there seems to be a new issue:
Uncaught ReferenceError: FontAwesome is not defined at...
where we add the custom PyData and PyPI icons. However, I do not know how to resolve this (this is beyond my JS knowledge).There is this document on customizing https://github.com/FortAwesome/Font-Awesome/wiki/Customize-Font-Awesome, which might be helpful for you. Could you please have a look?