a question about static file path #2192
-
In main.rs: page in but page in I can add some code to address this issue In main.rs: But I'd still like to know if there's a more elegant solution, similar to FLASK's url_for function |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Just use absolute paths in your HTML: - <script src="static/js/js.js"></script>
+ <script src="/static/js/js.js"></script> That will always resolve to the same thing and work anywhere.
No, but you can implement it yourself as a template helper. See the |
Beta Was this translation helpful? Give feedback.
Just use absolute paths in your HTML:
That will always resolve to the same thing and work anywhere.
No, but you can implement it yourself as a template helper. See the
dyn…