8000 minor #14530 add html extension to snake_case recommendation examples… · symfony/symfony-docs@c732edf · GitHub
[go: up one dir, main page]

Skip to content

Commit c732edf

Browse files
committed
minor #14530 add html extension to snake_case recommendation examples (ybenhssaien)
This PR was submitted for the 5.1 branch but it was merged into the 4.4 branch instead. Discussion ---------- 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 the whole page (at least the second recommentdation). I suggest to add `html` extension on the first examples to make sure the second recommendation cannot escape reader's eyes. <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `5.x` for features of unreleased versions). --> Commits ------- b3ef599 add html extension to snake_case recommendation examples
2 parents 2062d4a + b3ef599 commit c732edf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templates.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ Template Naming
118118

119119
Symfony recommends the following for template names:
120120

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

0 commit comments

Comments
 (0)
0