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

Changing template files from .html to '.html.twig' to get syntax highlighting #7

Closed
4d4ch4u32 opened this issue Dec 15, 2018 · 4 comments

Comments

@4d4ch4u32
Copy link

IDEs like PHP can handle .twig files better and provide syntax highlighting for Twig. This would make the work a bit easier.

@tbreuss
Copy link
Member

tbreuss commented Dec 17, 2018

Hi Anton, thanks for your comment. This makes absolutely sense. I'll try to fix this the next days.

@tbreuss
Copy link
Member

tbreuss commented Dec 17, 2018

A have a question about your suggestion.

In Drupal they use:

  • home.html.twig
  • default.html.twig
  • main.css.twig
  • etc.

In Twig documentation itself the recommend:

  • default.html
  • main.html

What is the common standard for naming twig templates? Do you have any suggestions on that?

@4d4ch4u32
Copy link
Author

Hmm I'm not sure, what the standard/default is. But I know that the standard of Symfony is home.html.twig or export.xml.twig. And, because IDEs like Phpstorm only show twig syntax highlighting for .twig files not for .html, I think that's more common. .twig maybe also better, because file extensions exists to identify the file type easier. ;-)

@tbreuss
Copy link
Member

tbreuss commented Oct 8, 2022

This behavior will be changed in the upcoming Herbie CMS 2.x and will then also be available here, see 769bb88.

@tbreuss tbreuss closed this as completed Oct 8, 2022
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