Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
I installed the theme "Bootstrap" with "Composer".
I want to download "Font Awesome" in my subtopic "Bootstrap".
How to add "Font Awesome" library to "Bootstrap"?
Comments
Comment #2
markhalliwellUse https://www.drupal.org/project/fontawesome
Comment #3
zenimagine CreditAttribution: zenimagine commentedthank you. But I installed "Drupal 8" with "Composer".
How do I install "Font Awesome" with "Composer"?
Comment #4
NexusStar CreditAttribution: NexusStar commentedYou can use
composer require drupal/fontawesome
this will install it as module. If you have in your `composer.json` fileit will be installed under web/modules/contrib and will be added as requirement to the project
Comment #5
brooke_heaton CreditAttribution: brooke_heaton as a volunteer commentedYou may need to add fontawesome to your 'repositories' array in your composer.json
After adding that, you should use 'composer require fontawesome/font-awesome' to add the fontawesome library. Note that in the 'repositories' array that I am installing it as a 'drupal-library' but with the name 'fontawesome'. As NexusStar notes, in order for the library to be installed in your 'libraries' direcotry, you need to add the install-paths with your appropriate path, which may be
"web/libraries/{$name}": ["type:drupal-library"],
or perhaps"web/libraries/{$name}": ["type:drupal-library"]
depending on your situation.