Unable to use locally stored external CSS #790
-
|
Hello, While exploring Mint I found a need to use external CSS. So exploring the generated skeleton I found that we can do that through
With that in place, when I start the server and access http://localhost:3000/ in Firefox browser in the console I see attached error message: 1.png
Checking the Network tab I see following 2.png
I also tried using href as Also, trying to directly access the CSS using URL http://localhost:3000/assets/mustard-ui.min.css I cannot see the CSS contents. When using CDN URL like following it shows following error in console but when I directly access that CDN URL it shows that CSS content. What is the problem and how do I fix it so that I can start using the external CSS styles in my pages? Also on the website where can we find more details about Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Hi 👋 This is not documented well, and I'm sorry about that 😞 but you are on the right track 👍 Static files (in Mints case, files that are outside the code like you want to use) are served from the You can see an example of it here:
There is a page about it in the old website (https://api.mint-lang.com/guide/getting-started/configuration), but it seems it wasn't migrated over yet. That page is mostly
There is not much to it. The contents defined in there will be appended into the |
Beta Was this translation helpful? Give feedback.
-
|
@gdotdesign Thanks a lot for your prompt guidance. As per your suggestion moving Note: I had to also add Then updating accessing http://localhost:3000 I could see the page with expected styling
Thanks a lot again. |
Beta Was this translation helpful? Give feedback.



Hi 👋
This is not documented well, and I'm sorry about that 😞 but you are on the right track 👍
Static files (in Mints case, files that are outside the code like you want to use) are served from the
publicdirectory. So you only need to putcss/mustard-ui.min.cssto thepublicdirectory.You can see an example of it here:
https://github.com/mint-lang/mint-realworld/blob/master/assets/head.html
https://github.com/mint-lang/mint-realworld/tree/master/public
There is a page about it in the old website (https://api.mint-lang.com/guide/getting-started/configuration), but it seems it wasn't migrat…