@@ -87,8 +87,8 @@ your application:
87
87
Introducing Assetic
88
88
-------------------
89
89
90
- Assetic combines two major ideas: :ref: `assets <cookbook- assetic-assets >` and
91
- :ref: `filters <cookbook- assetic-filters >`. The assets are files such as CSS,
90
+ Assetic combines two major ideas: :ref: `assets <assetic-assets >` and
91
+ :ref: `filters <assetic-filters >`. The assets are files such as CSS,
92
92
JavaScript and image files. The filters are things that can be applied to
93
93
these files before they are served to the browser. This allows a separation
94
94
between the asset files stored in the application and the files actually presented
@@ -117,7 +117,7 @@ load them from anywhere) before serving them. This means you can:
117
117
118
118
* Run image optimizations on your images
119
119
120
- .. _ cookbook-assetic -assets :
120
+ .. _ assetic -assets :
121
121
122
122
Assets
123
123
------
@@ -126,12 +126,12 @@ Using Assetic provides many advantages over directly serving the files.
126
126
The files do not need to be stored where they are served from and can be
127
127
drawn from various sources such as from within a bundle.
128
128
129
- You can use Assetic to process :ref: `CSS stylesheets <cookbook- assetic-including-css >`,
130
- :ref: `JavaScript files <cookbook- assetic-including-javascript >` and
131
- :ref: `images <cookbook- assetic-including-image >`. The philosophy
129
+ You can use Assetic to process :ref: `CSS stylesheets <assetic-including-css >`,
130
+ :ref: `JavaScript files <assetic-including-javascript >` and
131
+ :ref: `images <assetic-including-image >`. The philosophy
132
132
behind adding either is basically the same, but with a slightly different syntax.
133
133
134
- .. _ cookbook-assetic -including-javascript :
134
+ .. _ assetic -including-javascript :
135
135
136
136
Including JavaScript Files
137
137
~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -172,7 +172,7 @@ To include JavaScript files, use the ``javascripts`` tag in any template:
172
172
173
173
.. tip ::
174
174
175
- You can also include CSS stylesheets: see :ref: `cookbook- assetic-including-css `.
175
+ You can also include CSS stylesheets: see :ref: `assetic-including-css `.
176
176
177
177
In this example, all files in the ``Resources/public/js/ `` directory of the
178
178
AppBundle will be loaded and served from a different location. The actual
@@ -184,9 +184,9 @@ rendered tag might simply look like:
184
184
185
185
This is a key point: once you let Assetic handle your assets, the files are
186
186
served from a different location. This *will * cause problems with CSS files
187
- that reference images by their relative path. See :ref: `cookbook- assetic-cssrewrite `.
187
+ that reference images by their relative path. See :ref: `assetic-cssrewrite `.
188
188
189
- .. _ cookbook-assetic -including-css :
189
+ .. _ assetic -including-css :
190
190
191
191
Including CSS Stylesheets
192
192
~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -229,7 +229,7 @@ except with the ``stylesheets`` tag:
229
229
230
230
But because Assetic changes the paths to your assets, this *will * break any
231
231
background images (or other paths) that uses relative paths, unless you use
232
- the :ref: `cssrewrite <cookbook- assetic-cssrewrite >` filter.
232
+ the :ref: `cssrewrite <assetic-cssrewrite >` filter.
233
233
234
234
.. note ::
235
235
@@ -240,7 +240,7 @@ the :ref:`cssrewrite <cookbook-assetic-cssrewrite>` filter.
240
240
that there is a known issue that causes the ``cssrewrite `` filter to fail
241
241
when using the ``@AppBundle `` syntax for CSS stylesheets.
242
242
243
- .. _ cookbook-assetic -including-image :
243
+ .. _ assetic -including-image :
244
244
245
245
Including Images
246
246
~~~~~~~~~~~~~~~~
@@ -272,7 +272,7 @@ You can also use Assetic for image optimization. More information in
272
272
`LiipImagineBundle `_ community bundle, which allows to compress and
273
273
manipulate images (rotate, resize, watermark, etc.) before serving them.
274
274
275
- .. _ cookbook-assetic -cssrewrite :
275
+ .. _ assetic -cssrewrite :
276
276
277
277
Fixing CSS Paths with the ``cssrewrite `` Filter
278
278
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -333,7 +333,7 @@ the JavaScript files.
333
333
If you're new to Assetic and try to use your application in the ``prod ``
334
334
environment (by using the ``app.php `` controller), you'll likely see
335
335
that all of your CSS and JS breaks. Don't worry! This is on purpose.
336
- For details on using Assetic in the ``prod `` environment, see :ref: `cookbook- assetic-dumping `.
336
+ For details on using Assetic in the ``prod `` environment, see :ref: `assetic-dumping `.
337
337
338
338
And combining files doesn't only apply to *your * files. You can also use Assetic to
339
339
combine third party assets, such as jQuery, with your own into a single file:
@@ -437,7 +437,7 @@ with the ``@named_asset`` notation:
437
437
<script src="<?php echo $view->escape($url) ?>"></script>
438
438
<?php endforeach ?>
439
439
440
- .. _ cookbook-assetic -filters :
440
+ .. _ assetic -filters :
441
441
442
442
Filters
443
443
-------
@@ -557,7 +557,7 @@ done from the template and is relative to the public document root:
557
557
via configuration on each deployment. For more information, see the
558
558
:ref: `reference-framework-assets-version ` configuration option.
559
559
560
- .. _ cookbook-assetic -dumping :
560
+ .. _ assetic -dumping :
561
561
562
562
Dumping Asset Files
563
563
-------------------
@@ -591,7 +591,7 @@ by Symfony (as the asset files are in the ``dev`` environment). This is on
591
591
purpose - letting Symfony generate these files dynamically in a production
592
592
environment is just too slow.
593
593
594
- .. _ cookbook-assetic -dump-prod :
594
+ .. _ assetic -dump-prod :
595
595
596
596
Instead, each time you use your application in the ``prod `` environment (and therefore,
597
597
each time you deploy), you should run the following command:
0 commit comments