Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Bootstrap add css-link

Started by Christophe 9 years ago · 2 replies · 1553 views
9 years ago

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:
<!-- Bootstrap CSS -->
<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?

9 years ago

@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 ;-)

👍 1

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by FrViPofm, 4 weeks ago
4 473 2 weeks ago
Themes & Styling · by johan thomas, 5 years ago
1 800 3 weeks ago
Themes & Styling · by stuart young, 2 months ago
3 659 2 months ago
Themes & Styling · by Sebadamus, 3 months ago
5 679 2 months ago
Themes & Styling · by martynfoster735, 3 months ago
1 642 3 months ago