-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can't control position of external links relative to the pipeline #2470
Comments
Fixed with above commit combined with a slight change in your syntax: {% do assets.addCss('https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css', { position: 'before' }) %} Notice the quotes around the string |
Thank you for the fix! I think the following would be easier to read and also slightly more efficient:
NOTES:
|
you can override the position of an external if you provide a position in the |
Sorry, what I meant is that it is not possible to specify that by default all externals are out of the pipeline and override one external asset to force it being in the pipeline (by providing position: 'pipeline' in the By first testing if ($asset[$key] !== $value) we can often avoid several conditions that deal with the specific case of externals, that's why I added it first in the suggested code of my previous message. |
It is not possible to set the position of external links before the pipeline CSS file. I use Grav 1.6.6.
assets:
css_pipeline: true
css_pipeline_include_externals: false
{% do assets.addCss('https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css', { position: before }) %}
{% do assets.addCss('theme://css/style1.css') %}
{% do assets.addCss('theme://css/style2.css') %}
=> the external link (bootstrap.min.css) will appear after the pipeline.
The text was updated successfully, but these errors were encountered: