Bootstrap add css-link

Today follow a tutorial, making a theme.
Now i undertsand a bit, trying building my own Bootstrap 4 theme.
Founding this css-link from the Bootstrap website:

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">

Is it good adding so:
{% block stylesheets %}
{% do assets.addCss(‘https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css’, 100) %}
{% endblock %}
{{ assets.css() }}

I don’t know how adding this: ‘integrity=“sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4” crossorigin=“anonymous”’ inside the link, or is it not necessary?

Hi @ctuxboy

you can use this plugin

Just update to last version (repo not updated since 1 year), or better made a PR to that repo

Hope that helps

1 Like

@dimitrilongo thanks for the info.
But i will try implement directly in the theme itself, so i learn building themes for my next projects.
It is the best way, learning how things works and implement in a GRAV-theme.
At the moment following a Bootstrap theme from the download section, so i learn also a lot :wink:

1 Like