I recently upgraded FontAwesome on v1.15rc, so here's a little roundup of what I did in case anybody will encounter difficulties.
Download the latest version of FA from their website. You need this package.
Unpack and upload the files to your server at "(nodebb_dir)/public/vendor/fontawesome". You only need the contents of "/webfonts", "/less/_variables.less" and "/less/_icons.less". Don't upload anything else.
Make a copy of your old icons.less and variables.less, then replace them with your new files (remove the underscore).
Run the script provided by NodeMoster. I modified it a little and removed grep:
#!/bin/bash
#########################################################################################################
## copy latest font awesome's /webfonts/* to public/vendor/fontawesome/fonts ##
## copy latest font awesome's /less/_variables.less to public/vendor/fontawesome/less/variables.less ##
## copy latest font awesome's /less/_icons.less to public/vendor/fontawesome/less/icons.less ##
#########################################################################################################
latestfa=`curl -s https://github.com/FortAwesome/Font-Awesome/releases | grep "tree" | head -1 | grep -o -P '(?<=title=).*(?=>)'`
if ! grep $latestfa public/vendor/fontawesome/less/variables.less; then
echo "Latest Font Awesome not copied yet!"
exit 0;
fi
#Use back nodebb preferred font sizes
sed -i 's#../webfonts#./vendor/fontawesome/fonts#; s/16px/14px/; s#2em#(30em / 14)#' public/vendor/fontawesome/less/variables.less
#css for latest FA fonts
cat <<EOF > public/vendor/fontawesome/less/path.less
@font-face {
font-family: 'FontAwesome';
font-style: normal;
font-weight: 400;
src: url("@{fa-font-path}/fa-brands-400.eot");
src: url("@{fa-font-path}/fa-brands-400.eot?#iefix") format("embedded-opentype"), url("@{fa-font-path}/fa-brands-400.woff2") format("woff2"), url("@{fa-font-path}/fa-brands-400.woff") format("woff"), url("@{fa-font-path}/fa-brands-400.ttf") format("truetype"), url("@{fa-font-path}/fa-brands-400.svg#fontawesome") format("svg"); }
@font-face {
font-family: 'FontAwesome';
font-style: normal;
font-weight: 400;
src: url("@{fa-font-path}/fa-regular-400.eot");
src: url("@{fa-font-path}/fa-regular-400.eot?#iefix") format("embedded-opentype"), url("@{fa-font-path}/fa-regular-400.woff2") format("woff2"), url("@{fa-font-path}/fa-regular-400.woff") format("woff"), url("@{fa-font-path}/fa-regular-400.ttf") format("truetype"), url("@{fa-font-path}/fa-regular-400.svg#fontawesome") format("svg"); }
@font-face {
font-family: 'FontAwesome';
font-style: normal;
font-weight: 900;
src: url("@{fa-font-path}/fa-solid-900.eot");
src: url("@{fa-font-path}/fa-solid-900.eot?#iefix") format("embedded-opentype"), url("@{fa-font-path}/fa-solid-900.woff2") format("woff2"), url("@{fa-font-path}/fa-solid-900.woff") format("woff"), url("@{fa-font-path}/fa-solid-900.ttf") format("truetype"), url("@{fa-font-path}/fa-solid-900.svg#fontawesome") format("svg"); }
EOF
#Delete the old font links
sed -i '/fa fa-/d; ' src/views/partials/fontawesome.tpl
#Get new icons into variable
newfontawesome=`grep -o -P '(?<=fa-var-).*(?=:)' public/vendor/fontawesome/less/variables.less`
#Make icon Links
for i in $newfontawesome; do
echo "Insert $i Into Template"
echo "<i class=\"fa fa-$i\"></i>" >>/tmp/newfontawesome.txt
done
#Insert icons into template
sed -i '/fa-icons/r /tmp/newfontawesome.txt' src/views/partials/fontawesome.tpl #insert the new font links
echo "Done!"
#Some icons like fa-clock-o in /recent and fa-group in /group have been renamed and are not compatible with the latest FA5. In order to change them, inspect the element in your browser, under iconPicker class abd change fa-clock-o or fa-group to fa-500px or something else that you can click on and change it.
Run this modified Python script by abkcode which replaces all instances of old class names with the new ones. You may need to tweak it.
#!/usr/bin/env python
import os
from collections import OrderedDict
findreplace = [
('fa-500px', 'fa-500px'),
('fa-address-book-o', 'fa-address-book'),
('fa-address-card-o', 'fa-address-card'),
('fa-adn', 'fa-adn'),
('fa-amazon', 'fa-amazon'),
('fa-android', 'fa-android'),
('fa-angellist', 'fa-angellist'),
('fa-apple', 'fa-apple'),
('fa-area-chart', 'fa-chart-area'),
('fa-arrow-circle-o-down', 'fa-arrow-alt-circle-down'),
('fa-arrow-circle-o-left', 'fa-arrow-alt-circle-left'),
('fa-arrow-circle-o-right', 'fa-arrow-alt-circle-right'),
('fa-arrow-circle-o-up', 'fa-arrow-alt-circle-up'),
('fa-arrows-alt', 'fa-expand-arrows-alt'),
('fa-arrows-h', 'fa-arrows-alt-h'),
('fa-arrows-v', 'fa-arrows-alt-v'),
('fa-arrows', 'fa-arrows-alt'),
('fa-asl-interpreting', 'fa-american-sign-language-interpreting'),
('fa-automobile', 'fa-car'),
('fa-bandcamp', 'fa-bandcamp'),
('fa-bank', 'fa-university'),
('fa-bar-chart-o', 'fa-chart-bar'),
('fa-bar-chart', 'fa-chart-bar'),
('fa-bathtub', 'fa-bath'),
('fa-battery-0', 'fa-battery-empty'),
('fa-battery-1', 'fa-battery-quarter'),
('fa-battery-2', 'fa-battery-half'),
('fa-battery-3', 'fa-battery-three-quarters'),
('fa-battery-4', 'fa-battery-full'),
('fa-battery', 'fa-battery-full'),
('fa-behance', 'fa-behance'),
('fa-behance-square', 'fa-behance-square'),
('fa-bell-o', 'fa-bell'),
('fa-bell-slash-o', 'fa-bell-slash'),
('fa-bitbucket-square', 'fa-bitbucket'),
('fa-bitbucket', 'fa-bitbucket'),
('fa-bitcoin', 'fa-btc'),
('fa-black-tie', 'fa-black-tie'),
('fa-bluetooth-b', 'fa-bluetooth-b'),
('fa-bluetooth', 'fa-bluetooth'),
('fa-bookmark-o', 'fa-bookmark'),
('fa-btc', 'fa-btc'),
('fa-building-o', 'fa-building'),
('fa-buysellads', 'fa-buysellads'),
('fa-cab', 'fa-taxi'),
('fa-calendar-check-o', 'fa-calendar-check'),
('fa-calendar-minus-o', 'fa-calendar-minus'),
('fa-calendar-o', 'fa-calendar'),
('fa-calendar-plus-o', 'fa-calendar-plus'),
('fa-calendar-times-o', 'fa-calendar-times'),
('fa-calendar', 'fa-calendar-alt'),
('fa-caret-square-o-down', 'fa-caret-square-down'),
('fa-caret-square-o-left', 'fa-caret-square-left'),
('fa-caret-square-o-right', 'fa-caret-square-right'),
('fa-caret-square-o-up', 'fa-caret-square-up'),
('fa-cc-amex', 'fa-cc-amex'),
('fa-cc-diners-club', 'fa-cc-diners-club'),
('fa-cc-discover', 'fa-cc-discover'),
('fa-cc-jcb', 'fa-cc-jcb'),
('fa-cc-mastercard', 'fa-cc-mastercard'),
('fa-cc-paypal', 'fa-cc-paypal'),
('fa-cc-stripe', 'fa-cc-stripe'),
('fa-cc-visa', 'fa-cc-visa'),
('fa-cc', 'fa-closed-captioning'),
('fa-chain-broken', 'fa-unlink'),
('fa-chain', 'fa-link'),
('fa-check-circle-o', 'fa-check-circle'),
('fa-check-square-o', 'fa-check-square'),
('fa-chrome', 'fa-chrome'),
('fa-circle-o-notch', 'fa-circle-notch'),
('fa-circle-o', 'fa-circle'),
('fa-circle-thin', 'fa-circle'),
('fa-clipboard', 'fa-clipboard'),
('fa-clock-o', 'fa-clock'),
('fa-clone', 'fa-clone'),
('fa-close', 'fa-times'),
('fa-cloud-download', 'fa-cloud-download-alt'),
('fa-cloud-upload', 'fa-cloud-upload-alt'),
('fa-cny', 'fa-yen-sign'),
('fa-code-fork', 'fa-code-branch'),
('fa-codepen', 'fa-codepen'),
('fa-codiepie', 'fa-codiepie'),
('fa-comment-o', 'fa-comment'),
('fa-commenting-o', 'fa-comment-dots'),
('fa-commenting', 'fa-comment-dots'),
('fa-comments-o', 'fa-comments'),
('fa-compass', 'fa-compass'),
('fa-connectdevelop', 'fa-connectdevelop'),
('fa-contao', 'fa-contao'),
('fa-copyright', 'fa-copyright'),
('fa-creative-commons', 'fa-creative-commons'),
('fa-credit-card-alt', 'fa-credit-card'),
('fa-credit-card', 'fa-credit-card'),
('fa-css3', 'fa-css3'),
('fa-cutlery', 'fa-utensils'),
('fa-dashboard', 'fa-tachometer-alt'),
('fa-dashcube', 'fa-dashcube'),
('fa-deafness', 'fa-deaf'),
('fa-dedent', 'fa-outdent'),
('fa-delicious', 'fa-delicious'),
('fa-deviantart', 'fa-deviantart'),
('fa-diamond', 'fa-gem'),
('fa-digg', 'fa-digg'),
('fa-dollar', 'fa-dollar-sign'),
('fa-dot-circle-o', 'fa-dot-circle'),
('fa-dribbble', 'fa-dribbble'),
('fa-drivers-license-o', 'fa-id-card'),
('fa-drivers-license', 'fa-id-card'),
('fa-dropbox', 'fa-dropbox'),
('fa-drupal', 'fa-drupal'),
('fa-edge', 'fa-edge'),
('fa-eercast', 'fa-sellcast'),
('fa-empire', 'fa-empire'),
('fa-envelope-open-o', 'fa-envelope-open'),
('fa-envelope-o', 'fa-envelope'),
('fa-envira', 'fa-envira'),
('fa-etsy', 'fa-etsy'),
('fa-euro', 'fa-euro-sign'),
('fa-eur', 'fa-euro-sign'),
('fa-exchange', 'fa-exchange-alt'),
('fa-expeditedssl', 'fa-expeditedssl'),
('fa-external-link-square', 'fa-external-link-square-alt'),
('fa-external-link', 'fa-external-link-alt'),
('fa-eye-slash', 'fa-eye-slash'),
('fa-eyedropper', 'fa-eye-dropper'),
('fa-eye', 'fa-eye'),
('fa-facebook-f', 'fa-facebook-f'),
('fa-facebook-official', 'fa-facebook'),
('fa-facebook-square', 'fa-facebook-square'),
('fa-facebook', 'fa-facebook-f'),
('fa-feed', 'fa-rss'),
('fa-file-archive-o', 'fa-file-archive'),
('fa-file-audio-o', 'fa-file-audio'),
('fa-file-code-o', 'fa-file-code'),
('fa-file-excel-o', 'fa-file-excel'),
('fa-file-image-o', 'fa-file-image'),
('fa-file-movie-o', 'fa-file-video'),
('fa-file-o', 'fa-file'),
('fa-file-pdf-o', 'fa-file-pdf'),
('fa-file-photo-o', 'fa-file-image'),
('fa-file-picture-o', 'fa-file-image'),
('fa-file-powerpoint-o', 'fa-file-powerpoint'),
('fa-file-sound-o', 'fa-file-audio'),
('fa-file-text-o', 'fa-file-alt'),
('fa-file-text', 'fa-file-alt'),
('fa-file-video-o', 'fa-file-video'),
('fa-file-word-o', 'fa-file-word'),
('fa-file-zip-o', 'fa-file-archive'),
('fa-files-o', 'fa-copy'),
('fa-firefox', 'fa-firefox'),
('fa-first-order', 'fa-first-order'),
('fa-flag-o', 'fa-flag'),
('fa-flash', 'fa-bolt'),
('fa-flickr', 'fa-flickr'),
('fa-floppy-o', 'fa-save'),
('fa-folder-o', 'fa-folder'),
('fa-folder-open-o', 'fa-folder-open'),
('fa-font-awesome', 'fa-font-awesome'),
('fa-fonticons', 'fa-fonticons'),
('fa-fort-awesome', 'fa-fort-awesome'),
('fa-forumbee', 'fa-forumbee'),
('fa-foursquare', 'fa-foursquare'),
('fa-free-code-camp', 'fa-free-code-camp'),
('fa-frown-o', 'fa-frown'),
('fa-futbol-o', 'fa-futbol'),
('fa-gbp', 'fa-pound-sign'),
('fa-gears', 'fa-cogs'),
('fa-gear', 'fa-cog'),
('fa-get-pocket', 'fa-get-pocket'),
('fa-ge', 'fa-empire'),
('fa-gg-circle', 'fa-gg-circle'),
('fa-gg', 'fa-gg'),
('fa-git-square', 'fa-git-square'),
('fa-github-alt', 'fa-github-alt'),
('fa-github-square', 'fa-github-square'),
('fa-github', 'fa-github'),
('fa-gitlab', 'fa-gitlab'),
('fa-gittip', 'fa-gratipay'),
('fa-git', 'fa-git'),
('fa-glass', 'fa-glass-martini'),
('fa-glide-g', 'fa-glide-g'),
('fa-glide', 'fa-glide'),
('fa-google-plus-circle', 'fa-google-plus'),
('fa-google-plus-official', 'fa-google-plus'),
('fa-google-plus-square', 'fa-google-plus-square'),
('fa-google-plus', 'fa-google-plus-g'),
('fa-google-wallet', 'fa-google-wallet'),
('fa-google', 'fa-google'),
('fa-gratipay', 'fa-gratipay'),
('fa-grav', 'fa-grav'),
('fa-group', 'fa-users'),
('fa-hacker-news', 'fa-hacker-news'),
('fa-hand-grab-o', 'fa-hand-rock'),
('fa-hand-lizard-o', 'fa-hand-lizard'),
('fa-hand-o-down', 'fa-hand-point-down'),
('fa-hand-o-left', 'fa-hand-point-left'),
('fa-hand-o-right', 'fa-hand-point-right'),
('fa-hand-o-up', 'fa-hand-point-up'),
('fa-hand-paper-o', 'fa-hand-paper'),
('fa-hand-peace-o', 'fa-hand-peace'),
('fa-hand-pointer-o', 'fa-hand-pointer'),
('fa-hand-rock-o', 'fa-hand-rock'),
('fa-hand-scissors-o', 'fa-hand-scissors'),
('fa-hand-spock-o', 'fa-hand-spock'),
('fa-hand-stop-o', 'fa-hand-paper'),
('fa-handshake-o', 'fa-handshake'),
('fa-hard-of-hearing', 'fa-deaf'),
('fa-hdd-o', 'fa-hdd'),
('fa-header', 'fa-heading'),
('fa-heart-o', 'fa-heart'),
('fa-hospital-o', 'fa-hospital'),
('fa-hotel', 'fa-bed'),
('fa-hourglass-1', 'fa-hourglass-start'),
('fa-hourglass-2', 'fa-hourglass-half'),
('fa-hourglass-3', 'fa-hourglass-end'),
('fa-hourglass-o', 'fa-hourglass'),
('fa-houzz', 'fa-houzz'),
('fa-html5', 'fa-html5'),
('fa-id-badge', 'fa-id-badge'),
('fa-id-card-o', 'fa-id-card'),
('fa-ils', 'fa-shekel-sign'),
('fa-image', 'fa-image'),
('fa-imdb', 'fa-imdb'),
('fa-inr', 'fa-rupee-sign'),
('fa-instagram', 'fa-instagram'),
('fa-institution', 'fa-university'),
('fa-internet-explorer', 'fa-internet-explorer'),
('fa-intersex', 'fa-transgender'),
('fa-ioxhost', 'fa-ioxhost'),
('fa-joomla', 'fa-joomla'),
('fa-jpy', 'fa-yen-sign'),
('fa-jsfiddle', 'fa-jsfiddle'),
('fa-keyboard-o', 'fa-keyboard'),
('fa-krw', 'fa-won-sign'),
('fa-lastfm-square', 'fa-lastfm-square'),
('fa-lastfm', 'fa-lastfm'),
('fa-leanpub', 'fa-leanpub'),
('fa-legal', 'fa-gavel'),
('fa-lemon-o', 'fa-lemon'),
('fa-level-down', 'fa-level-down-alt'),
('fa-level-up', 'fa-level-up-alt'),
('fa-life-bouy', 'fa-life-ring'),
('fa-life-buoy', 'fa-life-ring'),
('fa-life-ring', 'fa-life-ring'),
('fa-life-saver', 'fa-life-ring'),
('fa-lightbulb-o', 'fa-lightbulb'),
('fa-line-chart', 'fa-chart-line'),
('fa-linkedin-square', 'fa-linkedin'),
('fa-linkedin', 'fa-linkedin-in'),
('fa-linode', 'fa-linode'),
('fa-linux', 'fa-linux'),
('fa-list-alt', 'fa-list-alt'),
('fa-long-arrow-down', 'fa-long-arrow-alt-down'),
('fa-long-arrow-left', 'fa-long-arrow-alt-left'),
('fa-long-arrow-right', 'fa-long-arrow-alt-right'),
('fa-long-arrow-up', 'fa-long-arrow-alt-up'),
('fa-mail-forward', 'fa-share'),
('fa-mail-reply-all', 'fa-reply-all'),
('fa-mail-reply', 'fa-reply'),
('fa-map-marker', 'fa-map-marker-alt'),
('fa-map-o', 'fa-map'),
('fa-maxcdn', 'fa-maxcdn'),
('fa-meanpath', 'fa-font-awesome'),
('fa-medium', 'fa-medium'),
('fa-meetup', 'fa-meetup'),
('fa-meh-o', 'fa-meh'),
('fa-minus-square-o', 'fa-minus-square'),
('fa-mixcloud', 'fa-mixcloud'),
('fa-mobile-phone', 'fa-mobile-alt'),
('fa-mobile', 'fa-mobile-alt'),
('fa-modx', 'fa-modx'),
('fa-moon-o', 'fa-moon'),
('fa-money', 'fa-money-bill-alt'),
('fa-mortar-board', 'fa-graduation-cap'),
('fa-navicon', 'fa-bars'),
('fa-newspaper-o', 'fa-newspaper'),
('fa-object-group', 'fa-object-group'),
('fa-object-ungroup', 'fa-object-ungroup'),
('fa-odnoklassniki-square', 'fa-odnoklassniki-square'),
('fa-odnoklassniki', 'fa-odnoklassniki'),
('fa-opencart', 'fa-opencart'),
('fa-openid', 'fa-openid'),
('fa-opera', 'fa-opera'),
('fa-optin-monster', 'fa-optin-monster'),
('fa-pagelines', 'fa-pagelines'),
('fa-paper-plane-o', 'fa-paper-plane'),
('fa-paste', 'fa-clipboard'),
('fa-pause-circle-o', 'fa-pause-circle'),
('fa-paypal', 'fa-paypal'),
('fa-pencil-square', 'fa-pen-square'),
('fa-pencil-square-o', 'fa-edit'),
('fa-pencil', 'fa-pencil-alt'),
('fa-photo', 'fa-image'),
('fa-picture-o', 'fa-image'),
('fa-pie-chart', 'fa-chart-pie'),
('fa-pied-piper-alt', 'fa-pied-piper-alt'),
('fa-pied-piper-pp', 'fa-pied-piper-pp'),
('fa-pied-piper', 'fa-pied-piper'),
('fa-pinterest-p', 'fa-pinterest-p'),
('fa-pinterest-square', 'fa-pinterest-square'),
('fa-pinterest', 'fa-pinterest'),
('fa-play-circle-o', 'fa-play-circle'),
('fa-plus-square-o', 'fa-plus-square'),
('fa-product-hunt', 'fa-product-hunt'),
('fa-qq', 'fa-qq'),
('fa-question-circle-o', 'fa-question-circle'),
('fa-quora', 'fa-quora'),
('fa-ravelry', 'fa-ravelry'),
('fa-ra', 'fa-rebel'),
('fa-rebel', 'fa-rebel'),
('fa-reddit-alien', 'fa-reddit-alien'),
('fa-reddit-square', 'fa-reddit-square'),
('fa-reddit', 'fa-reddit'),
('fa-refresh', 'fa-sync'),
('fa-registered', 'fa-registered'),
('fa-remove', 'fa-times'),
('fa-renren', 'fa-renren'),
('fa-reorder', 'fa-bars'),
('fa-repeat', 'fa-redo'),
('fa-resistance', 'fa-rebel'),
('fa-rmb', 'fa-yen-sign'),
('fa-rotate-left', 'fa-undo'),
('fa-rotate-right', 'fa-redo'),
('fa-rouble', 'fa-ruble-sign'),
('fa-ruble', 'fa-ruble-sign'),
('fa-rub', 'fa-ruble-sign'),
('fa-rupee', 'fa-rupee-sign'),
('fa-s15', 'fa-bath'),
('fa-safari', 'fa-safari'),
('fa-scissors', 'fa-cut'),
('fa-scribd', 'fa-scribd'),
('fa-sellsy', 'fa-sellsy'),
('fa-send-o', 'fa-paper-plane'),
('fa-send', 'fa-paper-plane'),
('fa-share-square-o', 'fa-share-square'),
('fa-shekel', 'fa-shekel-sign'),
('fa-sheqel', 'fa-shekel-sign'),
('fa-shield', 'fa-shield-alt'),
('fa-shirtsinbulk', 'fa-shirtsinbulk'),
('fa-sign-in', 'fa-sign-in-alt'),
('fa-sign-out', 'fa-sign-out-alt'),
('fa-signing', 'fa-sign-language'),
('fa-simplybuilt', 'fa-simplybuilt'),
('fa-skyatlas', 'fa-skyatlas'),
('fa-skype', 'fa-skype'),
('fa-slack', 'fa-slack'),
('fa-sliders', 'fa-sliders-h'),
('fa-slideshare', 'fa-slideshare'),
('fa-smile-o', 'fa-smile'),
('fa-snapchat-ghost', 'fa-snapchat-ghost'),
('fa-snapchat-square', 'fa-snapchat-square'),
('fa-snapchat', 'fa-snapchat'),
('fa-snowflake-o', 'fa-snowflake'),
('fa-soccer-ball-o', 'fa-futbol'),
('fa-sort-alpha-asc', 'fa-sort-alpha-down'),
('fa-sort-alpha-desc', 'fa-sort-alpha-up'),
('fa-sort-amount-asc', 'fa-sort-amount-down'),
('fa-sort-amount-desc', 'fa-sort-amount-up'),
('fa-sort-asc', 'fa-sort-up'),
('fa-sort-desc', 'fa-sort-down'),
('fa-sort-numeric-asc', 'fa-sort-numeric-down'),
('fa-sort-numeric-desc', 'fa-sort-numeric-up'),
('fa-soundcloud', 'fa-soundcloud'),
('fa-spoon', 'fa-utensil-spoon'),
('fa-spotify', 'fa-spotify'),
('fa-square-o', 'fa-square'),
('fa-stack-exchange', 'fa-stack-exchange'),
('fa-stack-overflow', 'fa-stack-overflow'),
('fa-star-half-empty', 'fa-star-half'),
('fa-star-half-full', 'fa-star-half'),
('fa-star-half-o', 'fa-star-half'),
('fa-star-o', 'fa-star'),
('fa-steam-square', 'fa-steam-square'),
('fa-steam', 'fa-steam'),
('fa-sticky-note-o', 'fa-sticky-note'),
('fa-stop-circle-o', 'fa-stop-circle'),
('fa-stumbleupon-circle', 'fa-stumbleupon-circle'),
('fa-stumbleupon', 'fa-stumbleupon'),
('fa-sun-o', 'fa-sun'),
('fa-superpowers', 'fa-superpowers'),
('fa-support', 'fa-life-ring'),
('fa-tablet', 'fa-tablet-alt'),
('fa-tachometer', 'fa-tachometer-alt'),
('fa-telegram', 'fa-telegram'),
('fa-television', 'fa-tv'),
('fa-tencent-weibo', 'fa-tencent-weibo'),
('fa-themeisle', 'fa-themeisle'),
('fa-thermometer-0', 'fa-thermometer-empty'),
('fa-thermometer-1', 'fa-thermometer-quarter'),
('fa-thermometer-2', 'fa-thermometer-half'),
('fa-thermometer-3', 'fa-thermometer-three-quarters'),
('fa-thermometer-4', 'fa-thermometer-full'),
('fa-thermometer', 'fa-thermometer-full'),
('fa-thumb-tack', 'fa-thumbtack'),
('fa-thumbs-o-down', 'fa-thumbs-down'),
('fa-thumbs-o-up', 'fa-thumbs-up'),
('fa-ticket', 'fa-ticket-alt'),
('fa-times-circle-o', 'fa-times-circle'),
('fa-times-rectangle-o', 'fa-window-close'),
('fa-times-rectangle', 'fa-window-close'),
('fa-toggle-down', 'fa-caret-square-down'),
('fa-toggle-left', 'fa-caret-square-left'),
('fa-toggle-right', 'fa-caret-square-right'),
('fa-toggle-up', 'fa-caret-square-up'),
('fa-trash-o', 'fa-trash-alt'),
('fa-trash', 'fa-trash-alt'),
('fa-trello', 'fa-trello'),
('fa-tripadvisor', 'fa-tripadvisor'),
('fa-try', 'fa-lira-sign'),
('fa-tumblr-square', 'fa-tumblr-square'),
('fa-tumblr', 'fa-tumblr'),
('fa-turkish-lira', 'fa-lira-sign'),
('fa-twitch', 'fa-twitch'),
('fa-twitter-square', 'fa-twitter-square'),
('fa-twitter', 'fa-twitter'),
('fa-unsorted', 'fa-sort'),
('fa-usb', 'fa-usb'),
('fa-usd', 'fa-dollar-sign'),
('fa-user-circle-o', 'fa-user-circle'),
('fa-user-o', 'fa-user'),
('fa-vcard-o', 'fa-address-card'),
('fa-vcard', 'fa-address-card'),
('fa-viacoin', 'fa-viacoin'),
('fa-viadeo-square', 'fa-viadeo-square'),
('fa-viadeo', 'fa-viadeo'),
('fa-video-camera', 'fa-video'),
('fa-vimeo-square', 'fa-vimeo-square'),
('fa-vimeo', 'fa-vimeo-v'),
('fa-vine', 'fa-vine'),
('fa-vk', 'fa-vk'),
('fa-volume-control-phone', 'fa-phone-volume'),
('fa-warning', 'fa-exclamation-triangle'),
('fa-wechat', 'fa-weixin'),
('fa-weibo', 'fa-weibo'),
('fa-weixin', 'fa-weixin'),
('fa-whatsapp', 'fa-whatsapp'),
('fa-wheelchair-alt', 'fa-accessible-icon'),
('fa-wikipedia-w', 'fa-wikipedia-w'),
('fa-window-close-o', 'fa-window-close'),
('fa-window-maximize', 'fa-window-maximize'),
('fa-window-restore', 'fa-window-restore'),
('fa-windows', 'fa-windows'),
('fa-won', 'fa-won-sign'),
('fa-wordpress', 'fa-wordpress'),
('fa-wpbeginner', 'fa-wpbeginner'),
('fa-wpexplorer', 'fa-wpexplorer'),
('fa-wpforms', 'fa-wpforms'),
('fa-xing-square', 'fa-xing-square'),
('fa-xing', 'fa-xing'),
('fa-y-combinator-square', 'fa-hacker-news'),
('fa-y-combinator', 'fa-y-combinator'),
('fa-yahoo', 'fa-yahoo'),
('fa-yc', 'fa-y-combinator'),
('fa-yc-square', 'fa-hacker-news'),
('fa-yelp', 'fa-yelp'),
('fa-yen', 'fa-yen-sign'),
('fa-yoast', 'fa-yoast'),
('fa-youtube-play', 'fa-youtube'),
('fa-youtube-square', 'fa-youtube-square'),
('fa-youtube', 'fa-youtube'),
('fa-var-arrows-v', 'fa-var-arrows-alt-v'),
('fa-fa', 'fa-font-awesome')
]
def upgrade(project_path, extensions, exclude_directories):
for dname, dirs, files in os.walk(project_path):
dirs[:] = [d for d in dirs if d not in exclude_directories]
for fname in files:
if(fname.lower().endswith(extensions)):
fpath = os.path.join(dname, fname)
print (fpath)
s = open(fpath).read()
for icon in findreplace:
s = s.replace(icon[0]+'"', icon[1]+'"')
s = s.replace(icon[0]+"'", icon[1]+"'")
s = s.replace(icon[0]+" ", icon[1]+" ")
# s = s.replace(icon[0], icon[1])
f = open(fpath, "w")
f.write(s)
print ("\nAbove files have been modified")
project_path = os.getcwd()
extensions = ('.html', 'js', '.tpl', '.less')
exclude_directories = set(['test', 'build', 'logs'])
upgrade(project_path, extensions, exclude_directories)
Now we can ./nodebb build and check for errors. You may need to manually replace the older names with the new ones that you can find in variables.less
Here's an example of an error:
Error: NameError: variable @fa-var-arrows-v is undefined in /root/nodebb/node_modules/nodebb-plugin-composer-default/static/less/composer.less
That is because in version 5 this icon is called fa-var-arrows-alt-v
After a successful build you can start your forum. If you installed a free version of FA you may want to change the font-weight for .fa, otherwise, a lot of icons will be missing. You also need to set vertical-align to some elements (like categories) as the new icons are aligned differently.
.fa {
font-weight: 900;
//experiment with this, some icons look better with the alignment, some don't
vertical-align: -0.125em;
}