-
How do I serve css along with an .html file? I am trying to build a very simple website but can't seem to find anything that works. This is what I currently have serving my html and have a completely flat file structure with my server.ts, routes.ts, and index.html, and style.css all in the same folder.
I'm using this in my html to load the css, but it doesn't work. I know this may be a stupid question but I can't find a good answer anywhere so it will be good to have it out there. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Found my own answer! I needed to add a route to serve my static content and place that content in it's own folder so that /:path+ doesn't cause any issues.
And my link tag in my html. |
Beta Was this translation helpful? Give feedback.
Found my own answer! I needed to add a route to serve my static content and place that content in it's own folder so that /:path+ doesn't cause any issues.
And my link tag in my html.
<link rel="stylesheet" type="text/css" href="/static/style.css"/>