-
-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
relative template paths and include_str support #877
Comments
I think I'm open to either of these (assuming the implemention doesn't add too much complexity), if you want take a whack at implementing this. Have a look at https://github.com/djc/askama/blob/main/askama_derive/src/generator.rs#L81 and https://github.com/djc/askama/blob/main/askama_derive/src/input.rs#L11. |
The first option is impossible to implement. The proc macro will only see the token But I like the second option! |
Yes please! I REALLY wish to co-locate the html file with the rust file. I've actively looked for alternatives to askama that does this, but I haven't found any, and I don't want to use anything else because I really like how askama does things. |
I'm currently using this: Create an empty
Downside is that you have to hard code the entire path |
Is there any progress? |
No, I guess there isn't. Do you want to submit a PR? |
I will try.... |
I think ATM the second option is also impossible to implement: rust-lang/rust#54725 (going on 6 years)
i.e. I don't think there's a way to do this at the moment. |
I would want to have the feature.html template be in the same folder as feature.rs.
It would be cool if you could do either one of:
A)
B)
The text was updated successfully, but these errors were encountered: