8000 add html extension to snake_case recommendation examples by ybenhssaien · Pull Request #14530 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

add html extension to snake_case recommendation examples #14530

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

Merged
merged 2 commits into from
Nov 12, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add html extension to snake_case recommendation examples
Some readers may inconsciently memorize the syntax `file_name.twig` and ignores the second `recommendation` (declaring two extension `html.twig`), it can happen if someone looks only for `snak_case` keyword without reading whole page.

I suggest to add `html` extension on the first examples to make sure recommendations cannot escape reader.
  • Loading branch information
ybenhssaien authored and OskarStark committed Nov 12, 2020
commit b3ef599517f14edf6be9ec602faa3c97f51512ac
4 changes: 2 additions & 2 deletions templates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ Template Naming

Symfony recommends the following for template names:

* Use `snake case`_ for filenames and directories (e.g. ``blog_posts.twig``,
``admin/default_theme/blog/index.twig``, etc.);
* Use `snake case`_ for filenames and directories (e.g. ``blog_posts.html.twig``,
``admin/default_theme/blog/index.html.twig``, etc.);
* Define two extensions for filenames (e.g. ``index.html.twig`` or
``blog_posts.xml.twig``) being the first extension (``html``, ``xml``, etc.)
the final format that the template will generate.
Expand Down
0