hellonico / timber-weblink-extension
Timber WebLink Twig extension.
Installs: 1 374
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: ^5.5.9 || >=7.0.8
- symfony/web-link: ^5.0
README
Bring Symfony WebLink component to Timber.
Provides native support for managing Link HTTP headers, which are the key to improve the application performance when using HTTP/2 and preloading capabilities of modern web browsers.
Install
composer require hellonico/timber-weblink-extension
Usage
{{ preload(asset('/css/app.css')) }}
Will result in:
HTTP/1.1 200 OK
Content-Type: text/html
...
Link: </css/app.css>; rel=preload
in your HTTP headers.
For more information about usage, see https://symfony.com/doc/current/web_link.html