How can I use fontawesome 5 pro with webflow and upload a JS file that doesn't work within the "Assets" part of webflow?

Published on
September 22, 2023

To use FontAwesome 5 Pro with Webflow and import a JS file that doesn't work within the "Assets" part of Webflow, you will need to follow these steps:

  1. Obtain the FontAwesome 5 Pro package: Purchase the FontAwesome 5 Pro package, which includes access to the Pro icons, styles, and JavaScript files. You will receive a zip folder containing the necessary files.

  2. Upload the CSS and Web Fonts files: Unzip the FontAwesome 5 Pro package and navigate to the webfonts folder. Upload all the font files to your Webflow project by going to the "Assets" tab in the Designer and clicking on the upload button. Additionally, upload the fontawesome.css or fontawesome.min.css file to the "Assets" tab.

  3. Add custom code to your Webflow project: In the Designer, go to the "Project Settings" section and click on the "Custom Code" tab. Add the following code to the "Head Code" section:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-pro/css/all.min.css">

This code will link your website to the FontAwesome 5 Pro stylesheet hosted on a CDN (Content Delivery Network). Make sure to replace "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-pro/css/all.min.css" with the correct URL if necessary.

  1. Import the FontAwesome JavaScript file: FontAwesome 5 Pro requires the use of a JavaScript file to render some of its advanced features. Unfortunately, Webflow does not currently support uploading external JavaScript files directly to the "Assets" tab.

To work around this limitation, follow these steps:

  • Upload the FontAwesome JavaScript file (.js) to a third-party hosting service or your own server using FTP or a file management system.
  • Obtain the direct URL of the uploaded JavaScript file.
  • In the "Custom Code" tab of your Webflow project settings, add the following code to the "Footer Code" section:
<script src="URL_OF_YOUR_JAVASCRIPT_FILE"></script>

Replace "URL_OF_YOUR_JAVASCRIPT_FILE" with the actual direct URL of your uploaded FontAwesome JavaScript file.

  1. Use FontAwesome 5 Pro icons in your Webflow project: Now that you have imported the necessary files and added the custom code, you can start using FontAwesome 5 Pro icons in your Webflow project.
  • Drag and drop an HTML Embed element onto the page where you want to use the icon.
  • Within the HTML Embed element, add the FontAwesome icon code using the appropriate HTML tag. For example:
<i class="fas fa-check"></i>

In this example, the fas class represents the FontAwesome Solid style, and the fa-check class represents the specific icon you want to use. Replace fa-check with the name of the desired FontAwesome 5 Pro icon.

That's it! You have successfully integrated FontAwesome 5 Pro with Webflow and uploaded a JavaScript file that doesn't work within the "Assets" part of Webflow.

Additional Information:

  • Remember to keep your FontAwesome 5 Pro subscription active to continue using the Pro features and access to updates.

Example Questions:

  1. How do I use FontAwesome 5 Pro with Webflow?
  2. Can I upload a JavaScript file that doesn't work within the "Assets" section of Webflow?
  3. What are the steps to integrate FontAwesome 5 Pro into a Webflow project?