Skip to content

Commit 237770b

Browse files
[AssetMapper] Changing the example file away from .css
Page: https://symfony.com/doc/6.4/frontend/asset_mapper.html Reason: `<link>` for CSS is included in `{{ importmap() }}`, so you usually don't have to call `{{ asset() }}` on a CSS.
1 parent 86976e6 commit 237770b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

frontend/asset_mapper.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ is a light layer that helps serve your files directly to the browser.
1414
The component has two main features:
1515

1616
* :ref:`Mapping & Versioning Assets <mapping-assets>`: All files inside of ``assets/``
17-
are made available publicly and **versioned**. You can reference
18-
``assets/styles/app.css`` in a template with ``{{ asset('styles/app.css') }}``.
19-
The final URL will include a version hash, like ``/assets/styles/app-3c16d9220694c0e56d8648f25e6035e9.css``.
17+
are made available publicly and **versioned**. You can reference the file
18+
``assets/images/product.jpeg`` in a Twig template with ``{{ asset('images/product.jpeg') }}``.
19+
The final URL will include a version hash, like ``/assets/images/product-3c16d9220694c0e56d8648f25e6035e9.jpeg``.
2020

2121
* :ref:`Importmaps <importmaps-javascript>`: A native browser feature that makes it easier
2222
to use the JavaScript ``import`` statement (e.g. ``import { Modal } from 'bootstrap'``)

0 commit comments

Comments
 (0)