Skip to content

Update Font Awesome to 4.7.0 (MkDocs Theme) - #1447

Merged
waylan merged 3 commits into
mkdocs:masterfrom
coliff:master
Apr 5, 2018
Merged

waylan merged 3 commits into
mkdocs:masterfrom
coliff:master

Conversation

@coliff

@coliff coliff commented Mar 28, 2018

Copy link
Copy Markdown
Contributor

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)

coliff added 2 commits March 28, 2018 16:55
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)
@waylan

waylan commented Mar 28, 2018

Copy link
Copy Markdown
Contributor

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
waylan previously requested changes Mar 28, 2018

@waylan waylan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the prefixes updated in mkdocs/themes/mkdocs/nav.html#L78-L82. Shouldn't they be updated from fa to fab?

@coliff

coliff commented Mar 29, 2018 •

Copy link
Copy Markdown
Contributor Author

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/)

Updating the readthedocs theme with upstream is the subject of #588

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...

@waylan

waylan commented Mar 29, 2018

Copy link
Copy Markdown
Contributor

I upgraded Font Awesome on the MkDocs theme to v4.7.0

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.

Would actually be nice to update to Bootstrap 4.

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
waylan dismissed their stale review March 29, 2018 15:09

My bad. Sorry

@waylan waylan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

@coliff

coliff commented Apr 4, 2018

Copy link
Copy Markdown
Contributor Author

Hi @waylan - I'd been working on updating this PR to Font Awesome 5 as you suggested.
I'm nearly done and expect to update my PR for that tomorrow.

@coliff

coliff commented Apr 5, 2018

Copy link
Copy Markdown
Contributor Author

Adding Font Awesome 5 fonts would mean adding a new webfonts dir and hosting 15 fonts (brands regular and solid - in 5x file formats). We could move them to the fonts dir where the Bootstrap 3 fonts are, but that would mean manually updating the paths of the CSS files.
So for now I updated to Font Awesome 4.7.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants