Loading more fonts from FontAwesome #259
-
Hi! I'm just playing around with Hugo for the first time, found your awesome theme and started using it so first of all a huge thank you! I'll be sure to do a PR for So in my content I'd like to use icons (already wrote a shortcode for it) from Font Awesome. Since Font Awesome is already used in the theme, I figured this would be easy but quickly found most of the icons I've been trying to use show up as non-existent. So I've delved into the code and found the following: I thought of the following:
Would you care to comment which is the preferred way to add availability of other FA icons? I'd bet the preferred way is different than any I've listed here (or maybe you think adding FA icons to the content should not be coupled with the code at all and definitely should be loaded a different way) ;P |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yep, we're using a custom Awesome Font icons set, defined in There are two ways to do it:
|
Beta Was this translation helpful? Give feedback.
Yep, we're using a custom Awesome Font icons set, defined in
./src/js/fonts.js
, in order to reduce the file size of icons, because we don't need all the icons that Awesome Font provided. And it also gives users the option to choose other icons.There are two ways to do it:
CustomJS
Since the theme using JS+SVG framework to replace all the Awesome Font to SVG, so the
CustomCSS
won't work. For example:You can also download the JS files and put it in the
static
directory…