Changing icons to Font Awesome Pro Version

Is there any tutorial of how to switch my discourse icons to the pro version from Font Awesome?

7개의 좋아요

Good idea, we should at least mention this somewhere @pmusaraj. Probably simple? I guess here in this topic is good!

7개의 좋아요

If the Pro package includes one SVG sprite file, you can add that file in a theme or a theme component, and reference it as an asset with the variable icons-sprite:

"assets": {
   "icons-sprite": "/assets/my-icons.svg"
}

If there are multiple sprite files in Pro, you might want to add them to a plugin.

Add each SVG sprite file in the plugins/your-plugin-name/svg-icons folder and then restart your server (if in dev) or rebuild the site.

4개의 좋아요

Access to the Pro packages, which contain more icons and styles, require you to configure the @fortawesome scope to use our Pro NPM registry. (Using a Package Manager | Font Awesome Docs)

I’m trying to install the pro version but I’m having no sucess at this. Do you have any tip?

You should do these npm steps somewhere else, at /var/discourse is not a good place for them. Also, I’m not sure how the Pro package is shipped, but you only need the svg sprites in Discourse. The free ones are here: https://github.com/FortAwesome/Font-Awesome/tree/master/sprites

2개의 좋아요

You’ll probably need to do that inside the container. You’d first do it with

./launcher enter app

and muck with it there, and then you’d edit app.yml to have it do that stuff when it built the container.

Or, you’d do that stuff elsewhere and get the svg file that you need and put it . . . somewhere.

And you probably don’t want to download all zillion of the things anyway.

1개의 좋아요

Very much this, the move to FontAwesome 5 coincided with a change to selectively load what was needed and reduced the amount of data sent to the browser by 63%. Blindly loading everything in FA5 Pro would push the needle well in the opposite direction.

5개의 좋아요

Actually I’m trying to change my icons to a more light style, not regular or solid. To use this style I need to be PRO on FontAwesome.

Example from a Discourse forum:

Or maybe those are custom icons.

I think it will be more cost-effective to use custom icons - there are loads of quality icon sites (or even sets) that don’t cost as much as FA pro.

4개의 좋아요

Hey @Merlls_Rizzini - 이 내용을 계속 찾고 계셨다면, 방금 모든 프로 아이콘을 설치할 수 있는 플러그인을 출시했습니다. 이를 통해 해당 과정을 좀 더 쉽게 진행할 수 있을 것입니다.

원하는 아이콘을 어떤 것으로 교체할지 파악하고, 새 아이콘을 사용하기 위한 테마 컴포넌트를 작성하는 작업이 여전히 필요하기 때문에(자세한 내용은 이 가이드의 기본 아이콘 교체 섹션을 참고하세요) 아직 해야 할 일이 남아 있습니다. 현재는 모든 아이콘을 다른 스타일(예: solid를 light로 교체)로 일괄 교체하는 방법은 없지만, 이러한 커스터마이징을 수행하는 데 도움이 되기를 바랍니다.

10개의 좋아요