在主题中使用 Font-Awesome 4 图标,但保留 FA5?

I copied the same exact thing and GitHub declined it. So I tried a different technique using local CDN:
https://github.com/FortAwesome/Font-Awesome/wiki/Customize-Font-Awesome#with-localcdn-fontawesomealljs
But it seems like there’s an error with the FA library. Here’s my broken code:

<script type="text/discourse-plugin" version="0.8">
    // replace 1568, 1568 with your SVG viewbox
// e001 is the unicode point which represents this custom icon. Increment this value for other icons
// replace 'M256...' with your single-path SVG
var faListOldStyle = {
  prefix: 'fas',
  iconName: 'oldm',
  icon: [1792, 1792, [], 'e001', 'M1344 960v-640h-448v1137q119-63 213-137 235-184 235-360zm192-768v768q0 86-33.5 170.5t-83 150-118 127.5-126.5 103-121 77.5-89.5 49.5-42.5 20q-12 6-26 6t-26-6q-16-7-42.5-20t-89.5-49.5-121-77.5-126.5-103-118-127.5-83-150-33.5-170.5v-768q0-26 19-45t45-19h1152q26 0 45 19t19 45z']
}
FontAwesome.library.add(
  faListOldStyle
)
</script>
<script type="text/discourse-plugin" version="0.8">
    api.replaceIcon('shield-alt', 'fas-olm');
</script>

This seems to be broken:

FontAwesome.library.add(
  faListOldStyle
)

Returning the following error:

2742f8c……020da268e4465.js:11 Uncaught ReferenceError: FontAwesome is not defined
    at 2742f8c……020da268e4465.js:11
(anonymous)	@	2742f8c……020da268e4465.js:11

Edit: I looked over your post here, and it worked! Thank you so much for guiding me on this tiny thing! :slight_smile:
53%20PM