Expand my Community achievements bar.

How to add Bootstrap Web Fonts to Sites without CDN?

Avatar

Level 4

Hi, I wanted to add Bootstrap Web Fonts to my site & use icons without using CDN. 

I did the following, Bootstrap is working fine but web fonts(kept fonts folder in & out of css folder) are not working in Sites. So, can you please tell me how to achieve this or what I missed? Thanks.

sesmic_0-1680584352855.png

 

4 Replies

Avatar

Community Advisor

A static resource can only be accessed via the proxy, if it resides below a resource below the client library folder.

As an example:

  • You have a clientlib in /apps/myproject/clientlibs/foo
  • You have a static image in /apps/myprojects/clientlibs/foo/resources/icon.png


Arun Patidar

Avatar

Level 4

Thanks @arunpatidar for the reply!
Can you please elaborate your point. I'm keeping my bootstrap files under clientlib-site with proxy allowed as in image. Even though web fonts aren't working. But bootstrap works.

Avatar

Community Advisor

you have to move fonts inside resources folder

e.g.

/apps/myprojects/clientlibs-site/resources/fonts/bootstrap-icons.woff



Arun Patidar

Avatar

Level 4

Tried, even that also not working. Web Fonts are coming like below. Any properties that need to be changed?

sesmic_0-1680718096054.png