You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The good news is that we already have first class support for Slim with the view layer we reintroduced in Hanami 2.1. Any *.html.slim template file will work :)
Unfortunately, our generators currently do not produce Slim templates. That --template=slim CHANGELOG entry you mentioned is from way back in Hanami 0.8.0, which is many years ago. That flag was lost when we reintroduced the view layer in 2.1.
If you'd like to open PRs bringing this flag back, I'd be very happy to review and accept them. Please also include Haml support, which is our other officially supported template engine :)
timriley
changed the title
About slim template support.
Add --template option to generators producing view templates
Sep 2, 2024
@timriley I can take it, since there are no takers. Would you want it for 2.2 release1?
Also one question for clarification:
The original report mentions hanami new bookshelf --template=slim, which I assume sets the default format, so it does not need to be specified every time with the generator. Should that be supported as well?
I like slim templates and would like to use them in HANAMI.
--template option
The FEATURES.md file contains the following.
I executed the following command.
Is the
--template
option already obsolete?generate slim template
The following command was executed to generate the action.
The
app/templates/home/show.html.erb
is created.How do I configure it to generate a show.html.slim instead of a show.html.erb?
Versions of Hanami are as follows.
Thank you very much for your time, and we appreciate your response.
The text was updated successfully, but these errors were encountered: