Skip to content
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

template attribute documentation #783

Open
freelon opened this issue Mar 2, 2023 · 1 comment
Open

template attribute documentation #783

freelon opened this issue Mar 2, 2023 · 1 comment

Comments

@freelon
Copy link

freelon commented Mar 2, 2023

Hi,

I stumbled upon the template() attribute doc, which states

ext (as ext = "txt"): lets you specify the content type as a file extension [...]. Cannot be used together with path.

I found this not to be true, I could combine both (for example #[template(path = "welcome.html.j2", ext = "html")]) and it compiled and used the html extension and mime type (which I'm happy about, because this way I can at least somewhat specify the MIME type :) ). So I guess the docs should get fixed here.

@livingsilver94
Copy link

That's not the case. In fact, j2 is a supported extension. Try to replace ".j2" with, say, ".in" and you'll find out that ext = "html" is ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants