MANUAL: clarify partial naming (#6476)

This commit is contained in:
Mauro Bieg 2020-06-21 19:29:55 +02:00 committed by GitHub
parent f5d7d41cbd
commit f91121fe56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1816,17 +1816,25 @@ ${ endfor }
### Partials ### Partials
Partials (subtemplates stored in different files) may be Partials (subtemplates stored in different files) may be
included using the syntax included by using the name of the partial, followed
by `()`, for example:
``` ```
${ boilerplate() } ${ styles() }
``` ```
Partials will be sought in the directory containing Partials will be sought in the directory containing
the main template, and will be assumed to have the the main template. The file name will be assumed to
same extension as the main template if they lack have the same extension as the main template if it
an explicit extension. (If the partials are not lacks an extension. When calling the partial, the
found here, they will also be sought in the `templates` full name including file extension can also be used:
```
${ styles.html() }
```
(If a partial is not found in the directory of the
template, it will also be sought in the `templates`
subdirectory of the user data directory.) subdirectory of the user data directory.)
Partials may optionally be applied to variables using Partials may optionally be applied to variables using