Repository navigation
Update Font Awesome to 4.7.0 (MkDocs Theme) - #1447
Conversation
Fixes #1438 Note: I'm looking into updating Font Awesome on the ReadTheDocs theme (the upstream RTD theme already has Font Awesome 4.7.0 included - but the CSS for the theme of the site is bundled together and is different to the one in MkDocs now so more work may be required to make sure the themes are in sync)
|
Updating the readthedocs theme with upstream is the subject of #588, which no one seems to want to work on. I see two paths. FontAwesome could be updated along with #588 or we could update FontAwesome only for the readthedocs theme and leave #588 for later. Either way, I don't think it makes sense to update FontAwesome on one theme but not the other. |
waylan
left a comment
There was a problem hiding this comment.
I don't see the prefixes updated in mkdocs/themes/mkdocs/nav.html#L78-L82. Shouldn't they be updated from fa to fab?
I upgraded Font Awesome on the MkDocs theme to v4.7.0 which is the same as what the current readthedocs theme uses. No prefix changes are needed at all.. it just means we get access to many more icons. (https://fontawesome.com/v4.7.0/icons/)
I agree the RTD theme needs updating too, but looks like the whole theme needs updating so maybe that theme should be updated in a separate PR. There are more changes which should ideally be made to the MkDocs theme too - it's using a very old version of Bootstrap (v3.0.3) which has many bugs and doesn't support jQuery 3. I'd like to make a seperate PR for that updating all the assets (Bootstrap, jQuery). Would actually be nice to update to Bootstrap 4... |
Right. I noticed that and then promptly forgot when I was doing my review. My apologies. Although, why not upgrade to v5? If so , I think just using the CSS solution is fine. No need for the JS/SVG solution, which apparently has additional complexities when used with JQuery. I couldn't help but notice that FontAwesome supports prerendering the JS/SVG solution on Node based sites. It would be interesting to get similar behavior here. But that would require cloning the JS code in Python and should probably be implemented as some sort of Jinja tag which is developed as a third party general purpose solution... So, probably not practical to do at this stage.
IIRC, there is a very specific reason why we don't use Bootstrap 4. Seems that there is some feature that Bootstrap 4 removed support for that we use/need. Unfortunately I couldn't find it in a search. Perhaps I'm thinking of something else. |
waylan
left a comment
There was a problem hiding this comment.
@coliff at a minimum the failing test needs to be addressed. The CSSLint tests are configured to skip all vendored files. As the version was in the old FontAwesome file name, the exclude-list needs to be updated.
|
Hi @waylan - I'd been working on updating this PR to Font Awesome 5 as you suggested. |
|
Adding Font Awesome 5 fonts would mean adding a new |
Fixes #1438
Note: I'm looking into updating Font Awesome on the ReadTheDocs theme (the upstream RTD theme already has Font Awesome 4.7.0 included - but the CSS for the theme of the site is bundled together and is different to the one in MkDocs now so more work may be required to make sure the themes are in sync)