-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
{% render "filename" %} with custom extensions #581
Comments
I think it's fine to keep it as its. In your case, you can customize |
but this implies using MvcViewEngine, right? My app is a console one. when creating the parser, we already provide a IFileProvider to mostly inform the "root" path. the proposed solution is to implement some kind of virtual method to search for and resolve the right filename. If the MVC already provides a bit of this, would be great to migrate the core into the parser itself. In short: there is a use case for using kinda some of the MVC functionality without the need for the full-blown MVC framework. |
Bumping this topic, |
There is already an https://github.com/sebastienros/fluid/blob/main/Fluid/TemplateOptions.cs#L19-L22 So you can set it as default options or per template (in |
Thank you, that'll work. For some reason I missed the usage file provider in I'll post an update after I finish the implementation. |
Currently,
{% render "filename" %}
will only look for a file calledfilename.liquid
. However, would be great to make it use the IFileProvider to figure out the proper file, allowing users to customize this behavior.It's particularly good if the liquid template is actually creating a known format in IDE, like HTML, CSS. Using the destination format extension like
filename.html
,filename.css
,filename.liquid.html
would allow the IDE to highlight the code properly.it's somewhat related to #357
probable targets:
The text was updated successfully, but these errors were encountered: