luizdepra / hugo-coder

A minimalist blog theme for hugo.
MIT License
2.69k stars 1.06k forks source link

Swap from ForkAwesome 1.2.0 to FontAwesome 6.5.1. #882

Closed simonhollingshead closed 8 months ago

simonhollingshead commented 8 months ago

Prerequisites

Put an x into the box(es) that apply:

Description

This change allows FontAwesome 6.5.1 to be used as a drop-in replacement for ForkAwesome 1.2.0.

The easiest way to see that my change has worked practically-invisibly is that the home page of the demo site now shows Medium with its new three-circular-blobs logo instead of the old capital-M logo, despite the fact I have not changed anything about the hugo configuration for the demo site.

Points of note here:

Issues Resolved

858

Checklist

Put an x into the box(es) that apply:

General

Resources

Contributors

simonhollingshead commented 8 months ago

I just wanted to add a second copy of the LICENSE.txt so that both directories with FA code contain the FA license.

sammy44nts commented 8 months ago

Thank you for the great work! Is it possible to fetch FontAwesome 6.5.1 from a CDN instead of importing it in hugo-coder own CSS ?

For Performance purpose, I'm planning to add an issue about uglifying JS and use multiple CSS instead of one big CSS in order to improve first paint.

simonhollingshead commented 8 months ago

It would be able to be done, but absolutely not as part of this specific PR. You're right that it would require splitting the CSS out so that it could be overridden. Otherwise, we'd be forcing external website dependencies on all users of the template which would be a big behaviour change which wasn't discussed in the original issue.

If you made the appropriate changes to split the CSS into multiple files, then replacing the fontawesome CSS with the CDN links at https://cdnjs.com/libraries/font-awesome would 'just work' - it'd automatically use the font files also hosted there.

luizdepra commented 8 months ago

Thank you!