You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fonts are served from custom route on server from /fonts.
The problem is that font-awesome fonts loads only on /. On other routes like /privacy they don't load. Styles are loaded propely.
index.css is under styles folder and is imported to layout and set globally. Same as in with-global-stylesheet.
To load font awesome i import it from static folder in index.css
@importurl('/static/styles/font-awesome.css');
in font awesome all src for fonts were changed to /fonts
All variants worked like a charm both on dev and prod but only on index page at /.
All packages are latest available on npm. I'm not including source code as it is almost all from examples but feel free to ask. I will be glad if anyone can help me.
The text was updated successfully, but these errors were encountered:
Grimones
changed the title
Not loading font awesome on other routes
Not loading Font Awesome fonts on other routes
Oct 28, 2017
I've created a repo based on the info in the issue, but it works fine (the FA files are loaded on root and /other page). Please PR/fork if that setup was not what you meant, or clarify here
Hi! I'm trying to migrate a website to Next.js. It happened that website uses a global index.css and also font-awesome.
I have tried with-global-stylesheet-simple
and with-global-stylesheet. The result was the same.
Currently i'm using with-global-stylesheet setup to load global css. Also, i'm using react-i18n for localizations configured by this i18next example
Global css is injected using global-styles-and-layouts proposal with
<Layout />
component.Fonts are served from custom route on server from
/fonts
.The problem is that font-awesome fonts loads only on
/
. On other routes like/privacy
they don't load. Styles are loaded propely.index.css
is under styles folder and is imported to layout and set globally. Same as in with-global-stylesheet.To load font awesome i import it from static folder in
index.css
in font awesome all src for fonts were changed to
/fonts
Also i have tried serving fonts from static folder (by default), and importing fonts in font awesome with
or
All variants worked like a charm both on dev and prod but only on index page at
/
.All packages are latest available on npm. I'm not including source code as it is almost all from examples but feel free to ask. I will be glad if anyone can help me.
The text was updated successfully, but these errors were encountered: