Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I mean, link the CSS file in the HTML/Markdown file, like this:
```
<link rel="stylesheet" href="style.css">
```
I always got a 404 for the style.css for some reason and I have tried many sources and none of them is successful. I have checked the server log and it seems like the server/the Python `Markdown` template engine treated the style.css file as a route and I have no idea how to fix this so maybe you guys can help me.
My brain is literally melting right now. -
iiii90853y@NoOneCares check the permissions of the web server. It might be not configured properly to return the file at the path you're using.
-
Root797793yCorrect directory?
Permissions?
Server?
Are you serving static assets or running everything through Python/markdown/etc. processing first?
Is there a CSS preprocessor in the way? -
Hard to say what's wrong without context, but sounds like you haven't configured a route for static content. Assuming you use Flask https://stackoverflow.com/a/...
-
@sariel That sucks not only in terms of caching, but will hurt again once you roll out CSP.
-
sariel84473y@Fast-Nop I guess I should have put that sarcasm tag in.
Inline styling is good for one thing, fucking over the next guy. -
@sariel When reality becomes farce, like in the web dev world, sarcasm is hard to detect. ;-/
Just look at the Tailwind homepage: a CSS framework (a bad idea in itself), and even that has fucking inline styling. -
@Root I am serving static assets. First I feed the index page file into a Markdown processor, and then I feed the output into the HTML request of the Python web framework I use (In this case is Sanic).
And no, I am not wrong about the place where the CSS file exists. It is at the root directory with the Markdown file and the server files. -
Ok, so after searching the Sanic doc for a little bit, I think the problem is because I haven't set a URL for my style.css file yet.
Related Rants
HOW CAN I LINK THE STYLESHEET FILE IN MY HTML????????? I have struggle with this problem for so many times, yet none of the time I succeed and have to start over. This one single question has had made me got headache so many times in the past, yet I never can solve it.
rant
help me
css
headache